From a3e3bf822761c477d3a297fe004496ffc6c7b10d Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 28 Jan 2021 07:39:05 -0500 Subject: Make hex_to_int and bin_to_int handle the prefix automatically Also add BinToInt to C# --- core/variant/variant_call.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/variant') diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 6523c597cf..bb31b9c864 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -968,8 +968,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(" ")); -- cgit v1.2.3 From e829b7aee48cfc988abea5a42bdbf02638a16513 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 29 Nov 2020 22:43:38 -0500 Subject: Unify URI encoding/decoding and add to C# http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode. --- core/variant/variant_call.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'core/variant') diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index bb31b9c864..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()); -- cgit v1.2.3