summaryrefslogtreecommitdiff
path: root/decoder/stringlib_test.cc
blob: ea39f30fe1bac7fec637862abf5d90e8065ff467 (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;
  }
};

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