summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-11-03 18:10:27 +0100
committerMicky <micheledevita2@gmail.com>2022-11-03 19:52:21 +0100
commit521d8a5d24f2341d814147ad0d659e3a8704c48d (patch)
tree00f65f322c61e507a91656803dc575c854cf2c15
parentc0de8d32d51d579e6dc1a5aac3fbcd6c7104eb61 (diff)
Remove "?" from String.c_escape()
-rw-r--r--core/string/ustring.cpp2
-rw-r--r--doc/classes/String.xml2
2 files changed, 1 insertions, 3 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index c86c8316fe..ec07654ce8 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -3899,7 +3899,6 @@ String String::c_unescape() const {
escaped = escaped.replace("\\v", "\v");
escaped = escaped.replace("\\'", "\'");
escaped = escaped.replace("\\\"", "\"");
- escaped = escaped.replace("\\?", "\?");
escaped = escaped.replace("\\\\", "\\");
return escaped;
@@ -3916,7 +3915,6 @@ String String::c_escape() const {
escaped = escaped.replace("\t", "\\t");
escaped = escaped.replace("\v", "\\v");
escaped = escaped.replace("\'", "\\'");
- escaped = escaped.replace("\?", "\\?");
escaped = escaped.replace("\"", "\\\"");
return escaped;
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 1ee91b91d2..e336ad295a 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -80,7 +80,7 @@
<method name="c_unescape" qualifiers="const">
<return type="String" />
<description>
- Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\?[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code].
+ Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code].
[b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence.
</description>
</method>