Split a string - dynamic
#1

Hey guys,
i have a little problem. I have a string and want to split it. But I don't know, how long the string is and how many delimiter exist. So the string can be: "a-b-c-d-e" (delimiter is '-') or "a-b-c" or "a-b-c-d". I think you know what I mean.
Is there any possibility to split the string "dynamicly" into an array?
Reply
#2

Yes, use sscanf and optional values
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)