diff options
| author | Rémi Verschelde | 2018-04-13 22:20:35 +0200 |
|---|---|---|
| committer | GitHub | 2018-04-13 22:20:35 +0200 |
| commit | e7e9d9a0ea87c246610e27fbace47b02e06d0d14 (patch) | |
| tree | 732f2bc4a712fd27213d2465d4cd057ecb43a1f9 /modules | |
| parent | 1d15c5d726600047805ab10d53ff2a7efdc41d8e (diff) | |
| parent | 00e98458ba3585f4e5e027e24b3362d4ae31a146 (diff) | |
| download | godot-e7e9d9a0ea87c246610e27fbace47b02e06d0d14.tar.gz godot-e7e9d9a0ea87c246610e27fbace47b02e06d0d14.tar.zst godot-e7e9d9a0ea87c246610e27fbace47b02e06d0d14.zip | |
Merge pull request #18156 from RandomShaper/fix-messed-pr
Revert "Unify http- and percent- encode/decode"
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/gdnative/gdnative/string.cpp | 18 | ||||
| -rw-r--r-- | modules/gdnative/gdnative_api.json | 14 | ||||
| -rw-r--r-- | modules/gdnative/include/gdnative/string.h | 7 |
3 files changed, 37 insertions, 2 deletions
diff --git a/modules/gdnative/gdnative/string.cpp b/modules/gdnative/gdnative/string.cpp index ab0f0e0a5..7f5dbc12b 100644 --- a/modules/gdnative/gdnative/string.cpp +++ b/modules/gdnative/gdnative/string.cpp @@ -1168,6 +1168,24 @@ godot_string GDAPI godot_string_c_unescape(const godot_string *p_self) { return result; } +godot_string GDAPI godot_string_http_escape(const godot_string *p_self) { + const String *self = (const String *)p_self; + godot_string result; + String return_value = self->http_escape(); + memnew_placement(&result, String(return_value)); + + return result; +} + +godot_string GDAPI godot_string_http_unescape(const godot_string *p_self) { + const String *self = (const String *)p_self; + godot_string result; + String return_value = self->http_unescape(); + memnew_placement(&result, String(return_value)); + + return result; +} + godot_string GDAPI godot_string_json_escape(const godot_string *p_self) { const String *self = (const String *)p_self; godot_string result; diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 9da2a6936..f41c3859b 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -5468,6 +5468,20 @@ ] }, { + "name": "godot_string_http_escape", + "return_type": "godot_string", + "arguments": [ + ["const godot_string *", "p_self"] + ] + }, + { + "name": "godot_string_http_unescape", + "return_type": "godot_string", + "arguments": [ + ["const godot_string *", "p_self"] + ] + }, + { "name": "godot_string_json_escape", "return_type": "godot_string", "arguments": [ diff --git a/modules/gdnative/include/gdnative/string.h b/modules/gdnative/include/gdnative/string.h index 8fc59e21d..73245160c 100644 --- a/modules/gdnative/include/gdnative/string.h +++ b/modules/gdnative/include/gdnative/string.h @@ -228,14 +228,17 @@ godot_string GDAPI godot_string_simplify_path(const godot_string *p_self); godot_string GDAPI godot_string_c_escape(const godot_string *p_self); godot_string GDAPI godot_string_c_escape_multiline(const godot_string *p_self); godot_string GDAPI godot_string_c_unescape(const godot_string *p_self); -godot_string GDAPI godot_string_percent_decode(const godot_string *p_self); -godot_string GDAPI godot_string_percent_encode(const godot_string *p_self); +godot_string GDAPI godot_string_http_escape(const godot_string *p_self); +godot_string GDAPI godot_string_http_unescape(const godot_string *p_self); godot_string GDAPI godot_string_json_escape(const godot_string *p_self); godot_string GDAPI godot_string_word_wrap(const godot_string *p_self, godot_int p_chars_per_line); godot_string GDAPI godot_string_xml_escape(const godot_string *p_self); godot_string GDAPI godot_string_xml_escape_with_quotes(const godot_string *p_self); godot_string GDAPI godot_string_xml_unescape(const godot_string *p_self); +godot_string GDAPI godot_string_percent_decode(const godot_string *p_self); +godot_string GDAPI godot_string_percent_encode(const godot_string *p_self); + godot_bool GDAPI godot_string_is_valid_float(const godot_string *p_self); godot_bool GDAPI godot_string_is_valid_hex_number(const godot_string *p_self, godot_bool p_with_prefix); godot_bool GDAPI godot_string_is_valid_html_color(const godot_string *p_self); |
