Page 1 of 1

Split string

PostPosted: Sat Jun 04, 2011 10:51 pm
by Clokio
I need to split a string
game/editor
and peut game into a variable
editor into another.
Or in array.

Thanks :mrgreen:

Re: Split string

PostPosted: Sun Jun 05, 2011 4:10 am
by Hblade
I would like to try and help but I have no idea what you mean :'(

Re: Split string

PostPosted: Sun Jun 05, 2011 8:36 am
by Clokio
Thanks.
Ex: I have the following string "abc/efg"
and I want to ask GE take what is at left and right of the / and put it into variable.

So I would have abc in a variable and efg

It's more C programmation question than GE I guess.

I found this, it talk about token and pointers. I have no idea what they are.
http://pubs.opengroup.org/onlinepubs/009695399/functions/strtok.html

Re: Split string

PostPosted: Sun Jun 05, 2011 9:14 am
by Clokio
guess I don't need this cause C have multi-dimention array. :lol:

Re: Split string

PostPosted: Mon Jun 06, 2011 3:00 am
by Hblade
I wouldn't know anything about that xD