A
Allan Bruce
I have a string like:
"FL:1234ABCD:3:FileName With Spaces.txt\n"
and I want to read the values separated by ':' into variables. I tried to
use sscanf like this:
sscanf("FL:%s:%d:%s\n", lGuid, &lID, lFileName);
but the lGUID just continues until whitespace or \0 is found. I need a way
to set the ':' as a separator, and a way for lFileName to be readable even
with whitespace in it.
Basically, a version of sscanf with specifiable speparators/terminators is
what I require. Is there anything to help me? At the moment, I am skipping
colons and using memcpy() which is messy.
Thanks
Allan
"FL:1234ABCD:3:FileName With Spaces.txt\n"
and I want to read the values separated by ':' into variables. I tried to
use sscanf like this:
sscanf("FL:%s:%d:%s\n", lGuid, &lID, lFileName);
but the lGUID just continues until whitespace or \0 is found. I need a way
to set the ':' as a separator, and a way for lFileName to be readable even
with whitespace in it.
Basically, a version of sscanf with specifiable speparators/terminators is
what I require. Is there anything to help me? At the moment, I am skipping
colons and using memcpy() which is messy.
Thanks
Allan