• Home
  • Raw
  • Download

Lines Matching refs:char16_t

27 static inline char16_t* getEmptyString() {  in getEmptyString()
29 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t)); in getEmptyString()
30 char16_t* str = static_cast<char16_t*>(buf->data()); in getEmptyString()
36 return static_cast<char16_t*>(gEmptyStringBuf->data()); in getEmptyString()
41 static char16_t* allocFromUTF8(const char* u8str, size_t u8len) in allocFromUTF8()
52 SharedBuffer* buf = SharedBuffer::alloc(sizeof(char16_t)*(u16len+1)); in allocFromUTF8()
55 char16_t* u16str = (char16_t*)buf->data(); in allocFromUTF8()
69 static char16_t* allocFromUTF16(const char16_t* u16str, size_t u16len) { in allocFromUTF16()
70 if (u16len >= SIZE_MAX / sizeof(char16_t)) { in allocFromUTF16()
75 SharedBuffer* buf = SharedBuffer::alloc((u16len + 1) * sizeof(char16_t)); in allocFromUTF16()
78 char16_t* str = (char16_t*)buf->data(); in allocFromUTF16()
79 memcpy(str, u16str, u16len * sizeof(char16_t)); in allocFromUTF16()
100 char16_t* data = static_cast<char16_t*>( in String16()
101 SharedBuffer::alloc(sizeof(char16_t))->data()); in String16()
118 String16::String16(const char16_t* o) : mString(allocFromUTF16(o, strlen16(o))) {} in String16()
120 String16::String16(const char16_t* o, size_t len) : mString(allocFromUTF16(o, len)) {} in String16()
144 return SharedBuffer::sizeFromData(mString)/sizeof(char16_t)-1; in size()
175 status_t String16::setTo(const char16_t* other) in setTo()
180 status_t String16::setTo(const char16_t* other, size_t len) in setTo()
182 if (len >= SIZE_MAX / sizeof(char16_t)) { in setTo()
188 ->editResize((len+1)*sizeof(char16_t)); in setTo()
190 char16_t* str = (char16_t*)buf->data(); in setTo()
191 memmove(str, other, len*sizeof(char16_t)); in setTo()
210 if (myLen >= SIZE_MAX / sizeof(char16_t) - otherLen) { in append()
216 ->editResize((myLen+otherLen+1)*sizeof(char16_t)); in append()
218 char16_t* str = (char16_t*)buf->data(); in append()
219 memcpy(str+myLen, other, (otherLen+1)*sizeof(char16_t)); in append()
226 status_t String16::append(const char16_t* chrs, size_t otherLen) in append()
236 if (myLen >= SIZE_MAX / sizeof(char16_t) - otherLen) { in append()
242 ->editResize((myLen+otherLen+1)*sizeof(char16_t)); in append()
244 char16_t* str = (char16_t*)buf->data(); in append()
245 memcpy(str+myLen, chrs, otherLen*sizeof(char16_t)); in append()
253 status_t String16::insert(size_t pos, const char16_t* chrs) in insert()
258 status_t String16::insert(size_t pos, const char16_t* chrs, size_t len) in insert()
277 ->editResize((myLen+len+1)*sizeof(char16_t)); in insert()
279 char16_t* str = (char16_t*)buf->data(); in insert()
281 memmove(str+pos+len, str+pos, (myLen-pos)*sizeof(char16_t)); in insert()
283 memcpy(str+pos, chrs, len*sizeof(char16_t)); in insert()
294 ssize_t String16::findFirst(char16_t c) const in findFirst()
296 const char16_t* str = string(); in findFirst()
297 const char16_t* p = str; in findFirst()
298 const char16_t* e = p + size(); in findFirst()
308 ssize_t String16::findLast(char16_t c) const in findLast()
310 const char16_t* str = string(); in findLast()
311 const char16_t* p = str; in findLast()
312 const char16_t* e = p + size(); in findLast()
329 bool String16::startsWith(const char16_t* prefix) const in startsWith()
336 bool String16::contains(const char16_t* chrs) const in contains()
344 const char16_t* str = string(); in makeLower()
345 char16_t* edit = nullptr; in makeLower()
347 const char16_t v = str[i]; in makeLower()
354 edit = (char16_t*)buf->data(); in makeLower()
363 status_t String16::replaceAll(char16_t replaceThis, char16_t withThis) in replaceAll()
366 const char16_t* str = string(); in replaceAll()
367 char16_t* edit = nullptr; in replaceAll()
375 edit = (char16_t*)buf->data(); in replaceAll()
399 ->editResize((N+1)*sizeof(char16_t)); in remove()
403 char16_t* str = (char16_t*)buf->data(); in remove()
404 memmove(str, str+begin, (N-begin+1)*sizeof(char16_t)); in remove()
408 ->editResize((len+1)*sizeof(char16_t)); in remove()
410 char16_t* str = (char16_t*)buf->data(); in remove()