19 template<
int>
struct selector;
20 template<>
struct selector<4> {
typedef char16_t Char16; };
21 template<>
struct selector<2> {
typedef wchar_t Char16; };
24#ifdef DISABLE_NATIVE_WCHAR_T
48 String16(
const unsigned short* str,
size_t len);
79 unsigned short*
udata() {
return reinterpret_cast<unsigned short*
>(data_); }
82 const unsigned short*
udata()
const {
return reinterpret_cast<const unsigned short*
>(data_); }
85 size_t length()
const {
return length_; }
88 size_t size()
const {
return length_; }
94 bool empty()
const {
return !data_ || length_ == 0; }
143 virtual size_t size()
const = 0;
#define UExport
Definition Exports.h:25
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition RefPtr.h:47
A nullable smart pointer.
Definition RefPtr.h:79
A null-terminated UTF-16 string container.
Definition String16.h:35
friend String16 operator+(String16 lhs, const String16 &rhs)
Definition String16.h:69
String16(const unsigned short *str, size_t len)
const Char16 & operator[](size_t pos) const
Definition String16.h:100
size_t size() const
Definition String16.h:88
String16 & operator=(String16 &&other)
const unsigned short * udata() const
Definition String16.h:82
bool empty() const
Definition String16.h:94
size_t length() const
Definition String16.h:85
Char16 & operator[](size_t pos)
Definition String16.h:97
String16(const String16 &other)
size_t sizeBytes() const
Definition String16.h:91
bool operator<(const String16 &other) const
bool operator==(const String16 &other) const
String16 & operator=(const String16 &other)
unsigned short * udata()
Definition String16.h:79
String16 & operator+=(const String16 &other)
const Char16 * data() const
Definition String16.h:75
Char16 * data()
Definition String16.h:72
String16(String16 &&other)
bool operator!=(const String16 &other) const
Char16 CharType
Definition String16.h:38
String16(const Char16 *str, size_t len)
A UTF-16 string vector.
Definition String16.h:128
String16Vector(const String16Vector &)
static RefPtr< String16Vector > Create(const String16 *stringArray, size_t len)
virtual void push_back(const String16 &val)=0
virtual String16 * data()=0
void operator=(const String16Vector &)
virtual size_t size() const =0
static RefPtr< String16Vector > Create()
virtual ~String16Vector()
A null-terminated UTF-32 string container.
Definition String32.h:20
A null-terminated UTF-8 string container.
Definition String8.h:20
detail::selector< sizeof(wchar_t)>::Char16 Char16
Definition String16.h:29