Jump to content
  • 0

How do I use 'space' as delimiter for the 'explode' script


anjasoleil1

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  65
  • Reputation:   0
  • Joined:  05/11/14
  • Last Seen:  

I need to deliminate an input with space. How do I do that? " " does not work

*explode(<dest_array>,<string>,<delimiter>)

Breaks a string up into substrings based on the specified delimiter. Substrings
will be stored within the specified string array. Only the 1st char of the
delimiter parameter will be used. If an empty string is passed as a delimiter,
the string will be placed in the array in its original form.

Example:
    explode(.@mapwarp$, @input$, ",");
    //.@my_array$ contents will be...
    //.@my_array$[0]: "Explode"
    //.@my_array$[1]: "Test"
    //.@my_array$[2]: "1965"
    //.@my_array$[3]: "red"
    //.@my_array$[4]: "PIE"

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  26
  • Reputation:   1
  • Joined:  06/25/16
  • Last Seen:  

I just tried this code:

explode(.@mapwarp$, "Hola y adios", " ");
        mes .@mapwarp$[0];
        mes .@mapwarp$[1];
        mes .@mapwarp$[2];

And it gives:

image.png.910729766db63924765d28b4de115458.png

So it works fine, you can delimitate using space.

¿Can you show your code?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...