Boost logo

Boost :

From: Jan Hermelink (Jan.Hermelink_at_[hidden])
Date: 2005-07-13 09:42:06


The 1.32 behaviour is compatible with Boost.Regex:

boost::regex_token_iterator in splitting mode returns for

"abc/abc/" -> 2 tokens

This is compatible with the regex standardization proposal.

I think the behaviour of boost::split should be the same.

Regards,

        Jan

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Stefan Slapeta
Posted At: Wednesday, July 13, 2005 3:13 PM
Posted To: Boost Developer
Conversation: [boost] [string algo] again strange split behaviour
Subject: [boost] [string algo] again strange split behaviour

hi,

I assume the behaviour of boost::split not to return the last token has
been changed (in CVS). However, a side effect seems to be that there is
also one token returned for _empty_ strings, which is very questionable
IMO!

summary (if '/' is the separator):

boost 1.32:
"" -> 0 tokens
"abc/abc" -> 2 tokens
"abc/abc/" -> 2 tokens

CVS:
"" -> 1 token (!)
"abc/abc" -> 2 tokens
"abc/abc/" -> 3 tokens

should be IMO:
"" -> 0 tokens
"abc/abc" -> 2 tokens
"abc/abc/" -> 3 tokens

Thoughts?

Stefan

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk