diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-28 14:48:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 14:48:59 +0100 |
commit | e50422d01cfc3b97ee259079d7fe88528f9dccbd (patch) | |
tree | 066731a9a3a000b97df58d33dd18841ef7f0b234 /core/variant | |
parent | 726967f45318359d95e3b0c359e088ca6d430292 (diff) | |
parent | e829b7aee48cfc988abea5a42bdbf02638a16513 (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.cpp | 10 |
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(" ")); |