Home
last modified time | relevance | path

Searched refs:otherLen (Results 1 – 2 of 2) sorted by relevance

/aosp14/system/core/libutils/
H A DString16.cpp206 status_t String16::append(const char16_t* chrs, size_t otherLen) { in append() argument
209 if (myLen == 0) return setTo(chrs, otherLen); in append()
211 if (otherLen == 0) return OK; in append()
214 if (__builtin_add_overflow(size, otherLen, &size) || in append()
222 memcpy(str + myLen, chrs, otherLen * sizeof(char16_t)); in append()
223 str[myLen + otherLen] = 0; in append()
235 if (myLen == 0) return setTo(chrs, otherLen); in insert()
237 if (otherLen == 0) return OK; in insert()
242 if (__builtin_add_overflow(size, otherLen, &size) || in insert()
251 memcpy(str + pos, chrs, otherLen * sizeof(char16_t)); in insert()
[all …]
H A DString8.cpp262 const size_t otherLen = other.bytes(); in append() local
266 } else if (otherLen == 0) { in append()
270 return real_append(other.string(), otherLen); in append()
278 status_t String8::append(const char* other, size_t otherLen) in append() argument
281 return setTo(other, otherLen); in append()
282 } else if (otherLen == 0) { in append()
286 return real_append(other, otherLen); in append()
331 status_t String8::real_append(const char* other, size_t otherLen) { in real_append() argument
336 if (__builtin_add_overflow(myLen, otherLen, &newLen) || in real_append()
345 memcpy(str, other, otherLen); in real_append()
[all …]