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

Method property_name_encode

core/string/ustring.cpp:5347–5356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5345}
5346
5347String String::property_name_encode() const {
5348 const char32_t *cstr = get_data();
5349 for (int i = 0; cstr[i]; i++) {
5350 if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] == ';' || cstr[i] == '[' || cstr[i] == ']' || cstr[i] < 33 || cstr[i] > 126) {
5351 return "\"" + c_escape_multiline() + "\"";
5352 }
5353 }
5354 // Keep as is
5355 return *this;
5356}
5357
5358/// Changes made to the set of invalid characters must also be reflected in the String documentation.
5359static const char32_t invalid_node_name_characters[] = { '.', ':', '@', '/', '\"', UNIQUE_NODE_PREFIX[0], 0 };

Callers 4

saveMethod · 0.80
encode_to_textMethod · 0.80
_internal_saveMethod · 0.80
_save_settings_textMethod · 0.80

Calls 1

get_dataFunction · 0.85

Tested by

no test coverage detected