diff options
Diffstat (limited to 'utils/stringlib_test.cc')
-rwxr-xr-x | utils/stringlib_test.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/stringlib_test.cc b/utils/stringlib_test.cc new file mode 100755 index 00000000..f66cdbeb --- /dev/null +++ b/utils/stringlib_test.cc @@ -0,0 +1,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()); +} |