예제 #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;
}