diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-11-19 11:38:29 -0500 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-11-19 11:39:37 -0500 |
commit | cfc378b251e4330c6b6be949d4c054f9bae48159 (patch) | |
tree | 148a5511d3c1d723b2f2f364c832c2ba6f267fcc /core/string/translation_po.cpp | |
parent | 9767837a7ec40697788765e581131cb2cf172567 (diff) | |
parent | fd4c29a189e53a1e085df5b9b9a05cac9351b3ef (diff) | |
download | redot-engine-cfc378b251e4330c6b6be949d4c054f9bae48159.tar.gz |
Merge commit godotengine/godot@fd4c29a189e53a1e085df5b9b9a05cac9351b3ef
Diffstat (limited to 'core/string/translation_po.cpp')
-rw-r--r-- | core/string/translation_po.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp index 5aa230ff00..ca59c0d2c1 100644 --- a/core/string/translation_po.cpp +++ b/core/string/translation_po.cpp @@ -229,11 +229,11 @@ void TranslationPO::set_plural_rule(const String &p_plural_rule) { // Set plural_forms and plural_rule. // p_plural_rule passed in has the form "Plural-Forms: nplurals=2; plural=(n >= 2);". - int first_semi_col = p_plural_rule.find(";"); - plural_forms = p_plural_rule.substr(p_plural_rule.find("=") + 1, first_semi_col - (p_plural_rule.find("=") + 1)).to_int(); + int first_semi_col = p_plural_rule.find_char(';'); + plural_forms = p_plural_rule.substr(p_plural_rule.find_char('=') + 1, first_semi_col - (p_plural_rule.find_char('=') + 1)).to_int(); - int expression_start = p_plural_rule.find("=", first_semi_col) + 1; - int second_semi_col = p_plural_rule.rfind(";"); + int expression_start = p_plural_rule.find_char('=', first_semi_col) + 1; + int second_semi_col = p_plural_rule.rfind_char(';'); plural_rule = p_plural_rule.substr(expression_start, second_semi_col - expression_start).strip_edges(); // Setup the cache to make evaluating plural rule faster later on. |