21 #define ICU_DISPLAY(string) char charBuf[1000]; \
22 UnicodeString s1( (CHAR_TYPE*)(string.c_str()) ); \
23 s1.extract(0, s1.length(), charBuf, sizeof(charBuf)-1, 0); \
24 charBuf[sizeof(charBuf)-1] = 0; \
25 std::cout << charBuf << std::endl;
41 _status = U_ZERO_ERROR;
42 _boundary = BreakIterator::createWordInstance( Locale::getUS(), _status );
44 _boundary->setText( ustr );
46 int32_t start = _boundary->first();
47 for (int32_t end = _boundary->next();
48 end != BreakIterator::DONE;
49 start = end, end = _boundary->next())
57 size_t len = end - start;
58 UnicodeString str( ustr, start, len );
60 str.toUTF8String( token );
61 lCData.
_tokens.push_back( token );
71 std::cout << token << std::endl;
75 std::cout <<
"Tokens: " << lCData.
_tokens.size() << std::endl;