#include <string>
#include <iostream>
#include <vector>
#include <boost/algorithm/string.hpp>
int main()
{
std::wstring m_inputText = L"hi how are you?";
std::vector<std::wstring> tok;
split(tok, m_inputText, boost::is_any_of(L" "));
for(std::vector<std::wstring>::iterator tok_iter = tok.begin();
tok_iter != tok.end(); ++tok_iter)
{
std::wcout << *tok_iter << '\n';
}
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8Ym9vc3QvYWxnb3JpdGhtL3N0cmluZy5ocHA+CgppbnQgbWFpbigpCnsKCiAgICAgICAgc3RkOjp3c3RyaW5nIG1faW5wdXRUZXh0ID0gTCJoaSBob3cgYXJlIHlvdT8iOwoKICAgICAgICBzdGQ6OnZlY3RvcjxzdGQ6OndzdHJpbmc+IHRvazsKICAgICAgICBzcGxpdCh0b2ssIG1faW5wdXRUZXh0LCBib29zdDo6aXNfYW55X29mKEwiICIpKTsKCiAgICAgICAgZm9yKHN0ZDo6dmVjdG9yPHN0ZDo6d3N0cmluZz46Oml0ZXJhdG9yIHRva19pdGVyID0gdG9rLmJlZ2luKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRva19pdGVyICE9IHRvay5lbmQoKTsgKyt0b2tfaXRlcikKICAgICAgICB7CiAgICAgICAgICAgICAgICBzdGQ6Ondjb3V0IDw8ICp0b2tfaXRlciA8PCAnXG4nOwogICAgICAgIH0KCn0K