1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #81639 from MJacred/is_letter

Add `is_valid_letter()` to `TextServer`
This commit is contained in:
Rémi Verschelde
2024-05-03 01:21:34 +02:00
11 changed files with 799 additions and 0 deletions

View File

@@ -490,6 +490,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(""));
@@ -2182,6 +2183,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();
}