bool EqualsASCII(const string16& a, const base::StringPiece& b)
{
    if(a.length() != b.length())
    {
        return false;
    }
    return std::equal(b.begin(), b.end(), a.begin());
}
bool ContainsOnlyWhitespace(const string16& str)
{
    for(string16::const_iterator i=str.begin(); i!=str.end(); ++i)
    {
        if(!IsWhitespace(*i))
        {
            return false;
        }
    }
    return true;
}
Exemple #3
0
bool LowerCaseEqualsASCII(const string16& a, const char* b) {
	return DoLowerCaseEqualsASCII(a.begin(), a.end(), b);
}
std::string UTF16ToASCII(const string16& utf16)
{
    DCHECK(IsStringASCII(utf16)) << utf16;
    return std::string(utf16.begin(), utf16.end());
}