18.05.2014, 10:19
(
Последний раз редактировалось nikitasicek; 18.05.2014 в 18:42.
)
Hello guys,
My english is not that good so I will try to explain the issue simply. I'm searching for solution about 2 hours and I can't find it.
I have string for example
but I don't know how many "blah" will this string contain. So it can be:
or
I was trying to do it this way:
but it returns
Simply: I want to split the string after every "," and save the words as arr[0], arr[1].
Thank you for help.
My english is not that good so I will try to explain the issue simply. I'm searching for solution about 2 hours and I can't find it.
I have string for example
Код:
"blah,blah"
Код:
"blah,blah,blah"
Код:
"blah,blah,blah,blah,blah,blah,blah,blah,blah"
Код:
new arr[3]; sscanf("Hello,Hi", "p<,>a<s[20]>[3]", arr); print(arr[1]);
Код:
"ello,Hi"
Thank you for help.