1// (c) Copyright John R. Bandela 2001.
2
3// Distributed under the Boost Software License, Version 1.0. (See
4// accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7// See http://www.boost.org/libs/tokenizer for documenation
8
9// simple_example_2.cpp
10#include<iostream>
11#include<boost/tokenizer.hpp>
12#include<string>
13
14int main(){
15 using namespace std;
16 using namespace boost;
17 string s = "Field 1,\"putting quotes around fields, allows commas\",Field 3";
18 tokenizer<escaped_list_separator<char> > tok(s);
19 for(tokenizer<escaped_list_separator<char> >::iterator beg=tok.begin(); beg!=tok.end();++beg){
20 cout << *beg << "\n";
21 }
22 return 0;
23}
24
25

source code of boost/libs/tokenizer/test/simple_example_2.cpp