I have a basic string question.
How could I extract a data from a string?
For example:
"set123f214..." this string should be separated as "set","123" and "f","214"
Any idea?
Wayne_
Joined: 10 Oct 2007 Posts: 681
Posted: Tue Feb 24, 2009 3:29 am
This all depends.
Does "set" change ?
If "set" does change is it always 3 chars ?
Is it allways 'f' ?
Is it allways 1 char ?
Are there always 3 numbers after each e.g. "001" ?
Do the values go above 255 ?
Will you ever get a number in the first set of chars ?
If it is fixed then it is very easy.
Otherwise you will need a routine to parse the string
ferkar
Joined: 14 Jul 2007 Posts: 38
string!
Posted: Tue Feb 24, 2009 3:47 am
"set" never changes
"f"never changes
the string contain numeric values "123" changes from"0000" to"9999"
the data format is always in the form of "abc" and"1234"
thanks
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum