Beispiel #1
0
CL_String8 operator+(const CL_StringData8 &s1, const CL_StringData8 &s2)
{
    CL_String8 result;
    result.reserve(s1.length() + s2.length());
    result.append(s1);
    result.append(s2);
    return result;
}
Beispiel #2
0
CL_String8 operator+(const CL_StringData8 &s1, char c)
{
    CL_String8 result;
    result.reserve(1 + s1.length());
    result.append(s1);
    result.push_back(c);
    return result;
}
Beispiel #3
0
CL_String8 operator+(char c, const CL_StringData8 &s2)
{
    CL_String8 result;
    result.reserve(1 + s2.length());
    result.push_back(c);
    result.append(s2);
    return result;
}
Beispiel #4
0
CL_String8 operator+(const CL_StringData8 &s1, const wchar_t *s2)
{
    CL_String8 result;
    CL_StringRef8 ref_s2(s2);
    result.reserve(ref_s2.length() + s1.length());
    result.append(s1);
    result.append(ref_s2);
    return result;
}
CL_StringData8::size_type CL_StringData8::find(const CL_StringData8 &s, size_type pos) const
{
	return find(s.data(), pos, s.length());
}
bool operator>(const CL_StringData8 &s1, const char *s2)
{
	return s1.compare(s2) > 0;
}
bool operator>(const char *s1, const CL_StringData8 &s2)
{
	return s2.compare(s1) < 0;
}
bool operator<(const CL_StringData8 &s1, const CL_StringData8 &s2)
{
	return s1.compare(s2) < 0;
}