MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / save_unicode_string

Method save_unicode_string

compat/resource_compat_binary.cpp:2401–2409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2399}
2400
2401void ResourceFormatSaverCompatBinaryInstance::save_unicode_string(Ref<FileAccess> p_f, const String &p_string, bool p_bit_on_len) {
2402 CharString utf8 = p_string.utf8();
2403 if (p_bit_on_len) {
2404 p_f->store_32(uint32_t((utf8.length() + 1) | 0x80000000));
2405 } else {
2406 p_f->store_32(uint32_t(utf8.length() + 1));
2407 }
2408 p_f->store_buffer((const uint8_t *)utf8.get_data(), utf8.length() + 1);
2409}
2410
2411int ResourceFormatSaverCompatBinaryInstance::get_string_index(const String &p_string) {
2412 StringName s = p_string;

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.80
store_bufferMethod · 0.45
get_dataMethod · 0.45

Tested by

no test coverage detected