Beispiel #1
0
bool StartsWith(UniString const & s, UniString const & p)
{
  if (p.size() > s.size())
    return false;
  for (size_t i = 0; i < p.size(); ++i)
  {
    if (s[i] != p[i])
      return false;
  }
  return true;
}
Beispiel #2
0
void NormalizeDigits(UniString & us)
{
  size_t const size = us.size();
  for (size_t i = 0; i < size; ++i)
  {
    UniChar const c = us[i];
    if (c >= 0xFF10 /* '0' */ && c <= 0xFF19 /* '9' */)
      us[i] = c - 0xFF10 + '0';
  }
}