summaryrefslogtreecommitdiffstats
path: root/modules/text_server_fb
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-04-04 10:56:49 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-04-04 10:56:49 +0300
commit27f6f4147bc30ce9c5124e552f004834a87ef94b (patch)
treedd3c216a89fd0cbc16fe405e182c0db6f51339ad /modules/text_server_fb
parentf47f4a02c87bb701452a621d254ad30c7be84faa (diff)
downloadredot-engine-27f6f4147bc30ce9c5124e552f004834a87ef94b.tar.gz
[TextServer] Expose ICU title case string conversion to scripting.
Diffstat (limited to 'modules/text_server_fb')
-rw-r--r--modules/text_server_fb/text_server_fb.cpp4
-rw-r--r--modules/text_server_fb/text_server_fb.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp
index 302bd677fe..1a0a4ec356 100644
--- a/modules/text_server_fb/text_server_fb.cpp
+++ b/modules/text_server_fb/text_server_fb.cpp
@@ -4439,6 +4439,10 @@ String TextServerFallback::_string_to_lower(const String &p_string, const String
return p_string.to_lower();
}
+String TextServerFallback::_string_to_title(const String &p_string, const String &p_language) const {
+ return p_string.capitalize();
+}
+
PackedInt32Array TextServerFallback::_string_get_word_breaks(const String &p_string, const String &p_language, int64_t p_chars_per_line) const {
PackedInt32Array ret;
diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h
index 0db1f7318f..9fd5af8b51 100644
--- a/modules/text_server_fb/text_server_fb.h
+++ b/modules/text_server_fb/text_server_fb.h
@@ -848,6 +848,7 @@ public:
MODBIND2RC(String, string_to_upper, const String &, const String &);
MODBIND2RC(String, string_to_lower, const String &, const String &);
+ MODBIND2RC(String, string_to_title, const String &, const String &);
MODBIND0(cleanup);