Пример #1
0
void MakeLowerCaseInplace(string & s)
{
  UniString uniStr;
  utf8::unchecked::utf8to32(s.begin(), s.end(), back_inserter(uniStr));
  MakeLowerCaseInplace(uniStr);
  s.clear();
  utf8::unchecked::utf32to8(uniStr.begin(), uniStr.end(), back_inserter(s));
}
Пример #2
0
 /// @warning unistring S must be not temporary!
 TokenizeIterator(UniString const & s, DelimFuncT const & delimFunc)
 : m_beg(s.begin()), m_end(s.begin()), m_finish(s.end()), m_delimFunc(delimFunc)
 {
   move();
 }
Пример #3
0
 // *NOTE* |s| must be not temporary!
 TokenizeIterator(UniString const & s, TDelimFn const & delimFn)
   : m_start(s.begin()), m_end(s.begin()), m_finish(s.end()), m_delimFn(delimFn), m_finished(false)
 {
   while (m_end != m_finish && !m_delimFn(*m_end))
     ++m_end;
 }
Пример #4
0
 // *NOTE* |s| must be not temporary!
 TokenizeIterator(UniString const & s, TDelimFn const & delimFn)
   : m_start(s.begin()), m_end(s.begin()), m_finish(s.end()), m_delimFn(delimFn)
 {
   Move();
 }
Пример #5
0
string ToUtf8(UniString const & s)
{
  string result;
  utf8::unchecked::utf32to8(s.begin(), s.end(), back_inserter(result));
  return result;
}