Ejemplo n.º 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));
}
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 5
0
string ToUtf8(UniString const & s)
{
  string result;
  utf8::unchecked::utf32to8(s.begin(), s.end(), back_inserter(result));
  return result;
}