MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / to_utf8_buffer

Method to_utf8_buffer

core/string/ustring.cpp:5888–5902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5886}
5887
5888Vector<uint8_t> String::to_utf8_buffer() const {
5889 const String *s = this;
5890 if (s->is_empty()) {
5891 return Vector<uint8_t>();
5892 }
5893 CharString charstr = s->utf8();
5894
5895 Vector<uint8_t> retval;
5896 size_t len = charstr.length();
5897 retval.resize_uninitialized(len);
5898 uint8_t *w = retval.ptrw();
5899 memcpy(w, charstr.ptr(), len);
5900
5901 return retval;
5902}
5903
5904Vector<uint8_t> String::to_utf16_buffer() const {
5905 const String *s = this;

Callers 14

test_zip.hFile · 0.80
do_import_rpcMethod · 0.80
hmac_digest_testFunction · 0.80
hmac_context_digest_testFunction · 0.80
load_svg_from_stringMethod · 0.80
format_outputMethod · 0.80
copy_and_rename_pdbMethod · 0.80
saveMethod · 0.80
selection_set_textMethod · 0.80

Calls 6

is_emptyMethod · 0.45
utf8Method · 0.45
lengthMethod · 0.45
resize_uninitializedMethod · 0.45
ptrwMethod · 0.45
ptrMethod · 0.45

Tested by 2

hmac_digest_testFunction · 0.64
hmac_context_digest_testFunction · 0.64