How to implement tokenizer.rbegin() and rend() for boost::tokenizer ?
- by Chan
Hello everyone,
I'm playing around with boost::tokenizer however I realize that it does not support rbegin() and rend(). I would like to ask how can I add these two functions to the existing class?
This is from the boost site:
#include <iostream>
#include <string>
#include <boost/tokenizer.hpp>
using namespace std;
using namespace boost;
int main() {
string str( "12/12/1986" );
typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
boost::char_separator<char> sep( "/" );
tokenizer tokens( str, sep );
cout << *tokens.begin() << endl;
// cout << *tokens.rbegin() << endl; How could I implement this?
return 0;
}