diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-14 23:24:35 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-14 23:24:35 +0100 |
commit | 19592847696f253175ed1f0ad1db3798b46bd8c9 (patch) | |
tree | e69567a3fd072f01bd0050bb98f3a60a7c865915 | |
parent | 0dbb632116fb934902939ce66bfac0d71a980dd8 (diff) | |
parent | 521d8a5d24f2341d814147ad0d659e3a8704c48d (diff) |
Merge pull request #68229 from Mickeon/c-escape-hell
Remove "?" from String.c_escape()
-rw-r--r-- | core/string/ustring.cpp | 2 | ||||
-rw-r--r-- | doc/classes/String.xml | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index d0d7b613ef..8993f9667d 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3922,7 +3922,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; @@ -3939,7 +3938,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 b0b4f74b46..999913b1ac 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> |