CL_StringRef16 CL_StringData16::substr(size_type pos, size_type n) const { const wchar_t *d = data_ptr; if (pos == npos || pos > data_length) return CL_StringRef16(d + data_length, 0, false); if (n == npos || n > data_length-pos) n = data_length - pos; return CL_StringRef16(d + pos, n, false); }
CL_String8 &CL_String8::append(const wchar_t *s, size_type n) { return append(CL_StringHelp::ucs2_to_utf8(CL_StringRef16(s, n, false))); }
CL_StringData16::operator CL_StringRef16() const { return CL_StringRef16(data(), length(), false); }