Boost logo

Boost Users :

From: Pavol Droba (droba_at_[hidden])
Date: 2005-01-19 02:04:32

Hi, Stefan

On Tue, Jan 18, 2005 at 04:43:59PM +0100, Stefan Slapeta wrote:
> Hi,
> please could anybody tell if it's possible to use split() to tokenize a
> string where the token delimiters are strings of
> - n characters, e.g. "\r\n"
> - m..n characters, e.g. "\n" _or_ "\r\n"
> If not, are there alternatives?

It is possible and quite easy with string_algo. Instead of split() try
to use split_iterator and as a finder use first_finder().
You may even try to use regex_finder.

You can find some more information in the docs.



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at