Exemple #1
0
StringRef StringRef::trimmed(StringRef charList) const
{
  size_t start = findFirstNotOf(charList);
  if (StringRef::npos == start)
    return StringRef();

  size_t end = findLastNotOf(charList);
  size_t count = end - start + 1;

  return subStr(start, count);
}
Exemple #2
0
int String::findFirstNotOf(const String& s, size_t& fpos, size_t pos) const
{
    return findFirstNotOf(s.getStr(), fpos, pos, s.length());
}