summaryrefslogtreecommitdiff
path: root/servers/text
diff options
context:
space:
mode:
Diffstat (limited to 'servers/text')
-rw-r--r--servers/text/text_server_extension.cpp10
-rw-r--r--servers/text/text_server_extension.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/servers/text/text_server_extension.cpp b/servers/text/text_server_extension.cpp
index 001706bb6f..005cb68302 100644
--- a/servers/text/text_server_extension.cpp
+++ b/servers/text/text_server_extension.cpp
@@ -293,6 +293,8 @@ void TextServerExtension::_bind_methods() {
GDVIRTUAL_BIND(strip_diacritics, "string");
+ GDVIRTUAL_BIND(string_get_word_breaks, "string", "language");
+
GDVIRTUAL_BIND(string_to_upper, "string", "language");
GDVIRTUAL_BIND(string_to_lower, "string", "language");
@@ -1503,6 +1505,14 @@ Array TextServerExtension::parse_structured_text(StructuredTextParser p_parser_t
return Array();
}
+PackedInt32Array TextServerExtension::string_get_word_breaks(const String &p_string, const String &p_language) const {
+ PackedInt32Array ret;
+ if (GDVIRTUAL_CALL(string_get_word_breaks, p_string, p_language, ret)) {
+ return ret;
+ }
+ return PackedInt32Array();
+}
+
TextServerExtension::TextServerExtension() {
//NOP
}
diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h
index ce781097f3..7b7fc61ed7 100644
--- a/servers/text/text_server_extension.h
+++ b/servers/text/text_server_extension.h
@@ -485,6 +485,9 @@ public:
virtual String strip_diacritics(const String &p_string) const override;
GDVIRTUAL1RC(String, strip_diacritics, const String &);
+ virtual PackedInt32Array string_get_word_breaks(const String &p_string, const String &p_language = "") const override;
+ GDVIRTUAL2RC(PackedInt32Array, string_get_word_breaks, const String &, 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 &);