mirror of
https://github.com/boostorg/tokenizer.git
synced 2026-01-23 06:02:15 +00:00
27 lines
693 B
C++
27 lines
693 B
C++
// © Copyright John R. Bandela 2001.
|
|
|
|
// Permission to copy, use, modify, sell and distribute this software
|
|
// is granted provided this copyright notice appears in all
|
|
// copies. This software is provided "as is" without express or
|
|
// implied warranty, and with no claim as to its suitability for any
|
|
// purpose.
|
|
|
|
// See http://www.boost.org/libs/tokenizer for documenation
|
|
|
|
|
|
// simple_example_1.cpp
|
|
#include<iostream>
|
|
#include<boost/tokenizer.hpp>
|
|
#include<string>
|
|
|
|
int main(){
|
|
using namespace std;
|
|
using namespace boost;
|
|
string s = "This is, a test";
|
|
tokenizer<> tok(s);
|
|
for(tokenizer<>::iterator beg=tok.begin(); beg!=tok.end();++beg){
|
|
cout << *beg << "\n";
|
|
}
|
|
}
|
|
|