diff options
Diffstat (limited to 'servers/text')
-rw-r--r-- | servers/text/text_server_extension.cpp | 19 | ||||
-rw-r--r-- | servers/text/text_server_extension.h | 5 |
2 files changed, 24 insertions, 0 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp index a2195d1ddf..d7e7960496 100644 --- a/servers/text/text_server_extension.cpp +++ b/servers/text/text_server_extension.cpp @@ -271,6 +271,9 @@ void TextServerExtension::_bind_methods() { GDVIRTUAL_BIND(_format_number, "string", "language"); GDVIRTUAL_BIND(_parse_number, "string", "language"); GDVIRTUAL_BIND(_percent_sign, "language"); + + GDVIRTUAL_BIND(_string_to_upper, "string", "language"); + GDVIRTUAL_BIND(_string_to_lower, "string", "language"); } bool TextServerExtension::has_feature(Feature p_feature) const { @@ -1365,6 +1368,22 @@ String TextServerExtension::percent_sign(const String &p_language) const { return TextServer::percent_sign(p_language); } +String TextServerExtension::string_to_upper(const String &p_string, const String &p_language) const { + String ret; + if (GDVIRTUAL_CALL(_string_to_upper, p_string, p_language, ret)) { + return ret; + } + return p_string; +} + +String TextServerExtension::string_to_lower(const String &p_string, const String &p_language) const { + String ret; + if (GDVIRTUAL_CALL(_string_to_lower, p_string, p_language, ret)) { + return ret; + } + return p_string; +} + TextServerExtension::TextServerExtension() { //NOP } diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h index 77f2ced951..6e203f22ee 100644 --- a/servers/text/text_server_extension.h +++ b/servers/text/text_server_extension.h @@ -449,6 +449,11 @@ public: GDVIRTUAL2RC(String, _parse_number, const String &, const String &); GDVIRTUAL1RC(String, _percent_sign, const String &); + virtual String string_to_upper(const String &p_string, const String &p_language = "") const override; + virtual String string_to_lower(const String &p_string, const String &p_language = "") const override; + GDVIRTUAL2RC(String, _string_to_upper, const String &, const String &); + GDVIRTUAL2RC(String, _string_to_lower, const String &, const String &); + TextServerExtension(); ~TextServerExtension(); }; |