Home | History | Annotate | Download | only in utils

Lines Matching refs:char16_t

36 static char16_t* gEmptyString = NULL;
38 static inline char16_t* getEmptyString()
46 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t));
47 char16_t* str = (char16_t*)buf->data();
62 static char16_t* allocFromUTF8(const char* u8str, size_t u8len)
75 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t)*(u16len+1));
78 char16_t* u16str = (char16_t*)buf->data();
111 String16::String16(const char16_t* o)
114 SharedBuffer* buf = SharedBuffer::alloc((len+1)*sizeof(char16_t));
117 char16_t* str = (char16_t*)buf->data();
126 String16::String16(const char16_t* o, size_t len)
128 SharedBuffer* buf = SharedBuffer::alloc((len+1)*sizeof(char16_t));
131 char16_t* str = (char16_t*)buf->data();
132 memcpy(str, o, len*sizeof(char16_t));
189 status_t String16::setTo(const char16_t* other)
194 status_t String16::setTo(const char16_t* other, size_t len)
197 ->editResize((len+1)*sizeof(char16_t));
199 char16_t* str = (char16_t*)buf->data();
200 memmove(str, other, len*sizeof(char16_t));
220 ->editResize((myLen+otherLen+1)*sizeof(char16_t));
222 char16_t* str = (char16_t*)buf->data();
223 memcpy(str+myLen, other, (otherLen+1)*sizeof(char16_t));
230 status_t String16::append(const char16_t* chrs, size_t otherLen)
241 ->editResize((myLen+otherLen+1)*sizeof(char16_t));
243 char16_t* str = (char16_t*)buf->data();
244 memcpy(str+myLen, chrs, otherLen*sizeof(char16_t));
252 status_t String16::insert(size_t pos, const char16_t* chrs)
257 status_t String16::insert(size_t pos, const char16_t* chrs, size_t len)
276 ->editResize((myLen+len+1)*sizeof(char16_t));
278 char16_t* str = (char16_t*)buf->data();
280 memmove(str+pos+len, str+pos, (myLen-pos)*sizeof(char16_t));
282 memcpy(str+pos, chrs, len*sizeof(char16_t));
293 ssize_t String16::findFirst(char16_t c) const
295 const char16_t* str = string();
296 const char16_t* p = str;
297 const char16_t* e = p + size();
307 ssize_t String16::findLast(char16_t c) const
309 const char16_t* str = string();
310 const char16_t* p = str;
311 const char16_t* e = p + size();
328 bool String16::startsWith(const char16_t* prefix) const
338 const char16_t* str = string();
339 char16_t* edit = NULL;
341 const char16_t v = str[i];
348 edit = (char16_t*)buf->data();
357 status_t String16::replaceAll(char16_t replaceThis, char16_t withThis)
360 const char16_t* str = string();
361 char16_t* edit = NULL;
369 edit = (char16_t*)buf->data();
393 ->editResize((N+1)*sizeof(char16_t));
397 char16_t* str = (char16_t*)buf->data();
398 memmove(str, str+begin, (N-begin+1)*sizeof(char16_t));
402 ->editResize((len+1)*sizeof(char16_t));
404 char16_t* str = (char16_t*)buf->data();