bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

StringTokenizer, wrong behaviour


From: Robert Kling
Subject: StringTokenizer, wrong behaviour
Date: 30 Aug 2003 12:58:30 +0200

Hi

Creating a StringTokenizer like:

StringTokenizer st(input, StringTokenizer::SPACE, true, true);

where the first 'true' is for SkipAllDelimiters and the second is for
TrimTokens..

Now, creating an iterator like:

StringTokenizer::iterator si = st.begin();

should'nt '*si' now contain the first token, skipping leading whitespace
if necessary?

As it is now, I have to do the following:

if (strlen(*si) == 0) ++si;

to get the first token. No biggie but still not right.

/Robert








reply via email to

[Prev in Thread] Current Thread [Next in Thread]