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

Method c_escape

core/string/ustring.cpp:4732–4746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4730}
4731
4732String String::c_escape() const {
4733 String escaped = *this;
4734 escaped = escaped.replace("\\", "\\\\");
4735 escaped = escaped.replace("\a", "\\a");
4736 escaped = escaped.replace("\b", "\\b");
4737 escaped = escaped.replace("\f", "\\f");
4738 escaped = escaped.replace("\n", "\\n");
4739 escaped = escaped.replace("\r", "\\r");
4740 escaped = escaped.replace("\t", "\\t");
4741 escaped = escaped.replace("\v", "\\v");
4742 escaped = escaped.replace("\'", "\\'");
4743 escaped = escaped.replace("\"", "\\\"");
4744
4745 return escaped;
4746}
4747
4748String String::c_escape_multiline() const {
4749 String escaped = *this;

Callers 11

generate_globalMethod · 0.80
saveMethod · 0.80
dict_to_pythonFunction · 0.80
_get_indent_char_nameMethod · 0.80
writeMethod · 0.80
stringify_variant_cleanFunction · 0.80
_quote_drop_dataFunction · 0.80
_reimport_fileMethod · 0.80
export_project_filesMethod · 0.80
test_string.hFile · 0.80

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected