[SOLVED]How to use sscanf using 'additionnal delimiter' format?
#1

Hey,
First of all, I'd like to separate entered text in a command, but all the data wouldn't be separated by spaces, but by '/' (birthdate) so I would type /birthdate dd/mm/yyyy (replace d, m and y by numbers) and I'd like to separate dd from mm and yyyy, etc. I've heard sscanf could do this, but only one problem, I don't know how!

Quote:
pX - An additional delimiter where X is another character.
Quote:
p<delimiter> Splitter The next character is used as a string delimiter, example:
"p|iii"
Will split this string into three integers:

1|2|3
Note that on things other than strings space is still used as well.
How to use this format?
Reply


Messages In This Thread
[SOLVED]How to use sscanf using 'additionnal delimiter' format? - by x-cutter - 03.01.2010, 13:32
Re: How to use sscanf using 'additionnal delimiter' format? - by woot - 03.01.2010, 13:42
Re: How to use sscanf using 'additionnal delimiter' format? - by x-cutter - 03.01.2010, 13:44

Forum Jump:


Users browsing this thread: 4 Guest(s)