Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
698 B

  1. // Test string class
  2. #include "headers.hxx"
  3. #include <containers.hpp>
  4. #include <iostream>
  5. HINSTANCE hResourceModuleHandle = 0;
  6. const wchar_t* RUNTIME_NAME = L"coretest";
  7. DWORD DEFAULT_LOGGING_OPTIONS = Burnslib::Log::OUTPUT_TYPICAL;
  8. VOID
  9. _cdecl
  10. main(int, char **)
  11. {
  12. LOG_FUNCTION(main);
  13. String s(L"a list of tokens all in a row");
  14. StringList tokens;
  15. size_t token_count = s.tokenize(std::back_inserter(tokens));
  16. ASSERT(token_count == tokens.size());
  17. for (
  18. StringList::iterator i = tokens.begin();
  19. i != tokens.end();
  20. ++i)
  21. {
  22. AnsiString ansi;
  23. i->convert(ansi);
  24. std::cout << ansi << std::endl;
  25. }
  26. }