Lines Matching refs:bufLength
416 size_t CopyDataToUtf16(uint16_t *buf, uint32_t length, uint32_t bufLength) const
421 if (length > bufLength) {
422 if (memcpy_s(buf, bufLength * sizeof(uint16_t), data, bufLength * sizeof(uint16_t)) != EOK) {
423 LOG_FULL(FATAL) << "memcpy_s failed when length > bufLength";
426 return bufLength;
428 if (memcpy_s(buf, bufLength * sizeof(uint16_t), data, length * sizeof(uint16_t)) != EOK) {
436 if (length > bufLength) {
437 return base::utf_helper::ConvertRegionUtf8ToUtf16(data, buf, bufLength, bufLength);
439 return base::utf_helper::ConvertRegionUtf8ToUtf16(data, buf, length, bufLength);
443 inline size_t WriteUtf16(uint16_t *buf, uint32_t targetLength, uint32_t bufLength) const
445 if (bufLength == 0) {
449 return CopyDataToUtf16(buf, targetLength, bufLength);
1262 uint32_t WriteToUtf16(uint16_t *buf, uint32_t bufLength)
1264 return string_->WriteUtf16(buf, GetLength(), bufLength);