|
Boost : |
From: Lars Schouw (schouwla_at_[hidden])
Date: 2008-05-28 09:20:24
Can I use the tokenizer to seperate my command and every 3 chars?
I have a string
A) XXXYYY
B) XXX,YYY
Can I use the tokenizer to seperate these?
I want to to check for strings of type A and then B.
Here is some code that does B but what about A before?
#include<iostream>#include<boost/tokenizer.hpp>#include
<string>void
{
string s1 =
string s =
tokenizer<escaped_list_separator<
cout << *beg <<
}
}main()usingnamespacestd;usingnamespaceboost;"LDNTOK";"XXX,YYY";char> > tok(s);for(tokenizer<escaped_list_separator<char> >::iterator beg=tok.begin(); beg!=tok.end();++beg){"\n";
Cheers.
Lars
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk