serakh00 Posted July 1, 2013 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 53 Reputation: 4 Joined: 02/08/12 Last Seen: December 10, 2018 Share Posted July 1, 2013 so here is my confusion : i have a string variable set @myvar$,"rathena"; then use explode explode (@myvar2$,@myvar$,"") does it copy each letter in @myvar$ into single index of @myvar2$ ? @myvar2[0]=r @myvar2[1]=a @myvar2[2]=t and so on ??? thaks before and sorry for my bad english.. Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 1, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 14 hours ago Share Posted July 1, 2013 it wont work ...it you didnt specify the delimiter...it will not break the string .. but you can do like this ... using the charat Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 1, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 1, 2013 explode (@myvar2$,@myvar$,"")does it copy each letter in @myvar$ into single index of @myvar2$ ? Nice try xD however empty string is not a valid delimiter 1 Quote Link to comment Share on other sites More sharing options...
serakh00 Posted July 2, 2013 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 53 Reputation: 4 Joined: 02/08/12 Last Seen: December 10, 2018 Author Share Posted July 2, 2013 (edited) it wont work ...it you didnt specify the delimiter...it will not break the string .. but you can do like this ... using the charat ok i got it thanks emisrty.. explode (@myvar2$,@myvar$,"")does it copy each letter in @myvar$ into single index of @myvar2$ ? Nice try xD however empty string is not a valid delimiter haha i though it will explode each letter even if delimiter is empty Edited July 2, 2013 by serakh00 Quote Link to comment Share on other sites More sharing options...
Question
serakh00
so here is my confusion :
i have a string variable
set @myvar$,"rathena";
then use explode
explode (@myvar2$,@myvar$,"")
does it copy each letter in @myvar$ into single index of @myvar2$ ?
@myvar2[0]=r
@myvar2[1]=a
@myvar2[2]=t
and so on ???
thaks before and sorry for my bad english..
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.