summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-01-28 14:48:59 +0100
committerGitHub <noreply@github.com>2021-01-28 14:48:59 +0100
commite50422d01cfc3b97ee259079d7fe88528f9dccbd (patch)
tree066731a9a3a000b97df58d33dd18841ef7f0b234 /core/variant
parent726967f45318359d95e3b0c359e088ca6d430292 (diff)
parente829b7aee48cfc988abea5a42bdbf02638a16513 (diff)
Merge pull request #43978 from aaronfranke/cs-string
Unify URI encoding/decoding, handle spaces-are-pluses, and handle hex/bin prefix automatically
Diffstat (limited to 'core/variant')
-rw-r--r--core/variant/variant_call.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 6523c597cf..2fd8134fbd 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -950,13 +950,11 @@ static void _register_variant_builtin_methods() {
bind_method(String, get_file, sarray(), varray());
bind_method(String, xml_escape, sarray("escape_quotes"), varray(false));
bind_method(String, xml_unescape, sarray(), varray());
- bind_method(String, http_escape, sarray(), varray());
- bind_method(String, http_unescape, sarray(), varray());
+ bind_method(String, uri_encode, sarray(), varray());
+ bind_method(String, uri_decode, sarray(), varray());
bind_method(String, c_escape, sarray(), varray());
bind_method(String, c_unescape, sarray(), varray());
bind_method(String, json_escape, sarray(), varray());
- bind_method(String, percent_encode, sarray(), varray());
- bind_method(String, percent_decode, sarray(), varray());
bind_method(String, is_valid_identifier, sarray(), varray());
bind_method(String, is_valid_integer, sarray(), varray());
@@ -968,8 +966,8 @@ static void _register_variant_builtin_methods() {
bind_method(String, to_int, sarray(), varray());
bind_method(String, to_float, sarray(), varray());
- bind_method(String, hex_to_int, sarray("with_prefix"), varray(true));
- bind_method(String, bin_to_int, sarray("with_prefix"), varray(true));
+ bind_method(String, hex_to_int, sarray(), varray());
+ bind_method(String, bin_to_int, sarray(), varray());
bind_method(String, lpad, sarray("min_length", "character"), varray(" "));
bind_method(String, rpad, sarray("min_length", "character"), varray(" "));