Boost logo

Boost Users :

From: CN (cnliou9_at_[hidden])
Date: 2005-11-01 01:02:33


Hi!

The following code uses '\0' and ';' as seperators and produces the
result:

<X><Y><><Z><>

string str=string("X;Y\0\0Z\0",7);
typedef tokenizer<boost::escaped_list_separator<char> > Tok;
escaped_list_separator<char> sep(string(),string("\0;",2),string());
Tok tokens(str, sep);
for(Tok::iterator i = tokens.begin();i != tokens.end();++i)
  cout << "<" << *i << ">";

How to revise it in order to get this result?

<X><Y><Z>

Thank you in advance!

CN

-- 
http://www.fastmail.fm - Does exactly what it says on the tin

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net