summaryrefslogtreecommitdiff
path: root/decoder/stringlib_test.cc
blob: f66cdbebcd70976df465cffb5724c404c38a04a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define STRINGLIB_DEBUG
#include "stringlib.h"

using namespace std;
struct print {
  template <class S>
  void operator()(S const& s) const {
    cout<<s<<endl;
  }
};

char p[]=" 1 are u 2 serious?";
int main(int argc, char *argv[]) {
  std::string const& w="verylongword";
  VisitTokens(p,print());
  VisitTokens(w,print());
}