You can use strchr() itself. It would return you the ptr to the first
occurance of the char in ptr, which you can increment by 1 each time
to get the next occurance.
Also, avoid using strtok(), as it is not thread safe.
If you are writing C++ progs, use strstream.
On Tue, 20 Jul 2004 11:34:23 +0530, Viveka Nathan K <vivek@xxxxxxxxxxxx> wrote:
By using strtok(), if I read the /etc/passwd file with delimiter
I am not getting expected result. For example, if a line contains
the '::' is read at once instead of twice.
Is there any other way to read data with delimiter ?
Viveka Nathan K
IndoFuji Information Technologies Pvt Ltd., Bangalore 560 076.
www.indofuji.com Ph: 080-26784122/33/55 (ext) 46
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> address"
in the subject or body of the message.