From 717513a62d971681a342303216143b30c5d20d4b Mon Sep 17 00:00:00 2001 From: MJacred Date: Thu, 2 May 2024 21:32:20 +0200 Subject: Add is_valid_letter() to TextServer --- servers/text_server.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'servers/text_server.cpp') diff --git a/servers/text_server.cpp b/servers/text_server.cpp index b67a698615..34daa4b414 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -483,6 +483,7 @@ void TextServer::_bind_methods() { ClassDB::bind_method(D_METHOD("strip_diacritics", "string"), &TextServer::strip_diacritics); ClassDB::bind_method(D_METHOD("is_valid_identifier", "string"), &TextServer::is_valid_identifier); + ClassDB::bind_method(D_METHOD("is_valid_letter", "unicode"), &TextServer::is_valid_letter); ClassDB::bind_method(D_METHOD("string_to_upper", "string", "language"), &TextServer::string_to_upper, DEFVAL("")); ClassDB::bind_method(D_METHOD("string_to_lower", "string", "language"), &TextServer::string_to_lower, DEFVAL("")); @@ -2091,6 +2092,10 @@ bool TextServer::is_valid_identifier(const String &p_string) const { return true; } +bool TextServer::is_valid_letter(char32_t p_unicode) const { + return is_unicode_letter(p_unicode); +} + TextServer::TextServer() { _init_diacritics_map(); } -- cgit v1.2.3