Lines Matching refs:encoded
338 * Returns the maximum possible string length that can be successfully encoded
370 const std::string& encoded = str;
372 reinterpret_cast<const uint8_t*>(encoded.data()), encoded.size());
375 // Make sure the lengths to be encoded do not exceed the maximum length that
376 // can be encoded using chars
377 if ((((size_t)encoded.size()) > EncodeLengthMax<char>())
388 + EncodedLengthUnits<char>(encoded.size()) + encoded.size() + 1;
396 data = EncodeLength(data, encoded.size());
397 strncpy(data, encoded.data(), encoded.size());
400 const std::u16string encoded = util::Utf8ToUtf16(str);
401 const ssize_t utf16_length = encoded.size();
403 // Make sure the length to be encoded does not exceed the maximum possible
404 // length that can be encoded
415 + encoded.size() + 1;
421 const size_t byte_length = encoded.size() * sizeof(char16_t);
425 memcpy(data, encoded.data(), byte_length);