Click to See Complete Forum and Search --> : tab-delimited file reading


todd w
08-08-2000, 03:25 PM
Can anyone help me tokenize a string that is tab delimited? I can get all
the tokens that are present in the string, but how do I get the NULL token
that is represented inbetween two sequential tab characters? i.e. <tab>[TOKEN]<tab>[NULL]<tab>
--> I want to recognize that there was a double tab.

Thanks in advance.

Danny Kalev
08-08-2000, 08:16 PM
I'm not sure I understand what you're trying to do, but opening a file
in binary mode ensures that you can get any character therein without
interpretation. Read the characters into a buffer, not a string, because
the null character is interpreted as a string delimiter. Make sure that
you haven't reached the EOF character. Does that help?

Danny

todd w wrote:
>
> Can anyone help me tokenize a string that is tab delimited? I can get all
> the tokens that are present in the string, but how do I get the NULL token
> that is represented inbetween two sequential tab characters? i.e. <tab>[TOKEN]<tab>[NULL]<tab>
> --> I want to recognize that there was a double tab.
>
> Thanks in advance.