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

Replace String::find_last with rfind where possible (backward compatible with old API)

This commit is contained in:
Bartłomiej T. Listwon
2022-01-08 22:40:44 +01:00
parent 37b9aba458
commit 22750b1c03
18 changed files with 35 additions and 43 deletions

View File

@@ -1406,7 +1406,7 @@ void EditorExportPlatformAndroid::_fix_resources(const Ref<EditorExportPreset> &
str = get_project_name(package_name);
} else {
String lang = str.substr(str.find_last("-") + 1, str.length()).replace("-", "_");
String lang = str.substr(str.rfind("-") + 1, str.length()).replace("-", "_");
String prop = "application/config/name_" + lang;
if (ProjectSettings::get_singleton()->has_setting(prop)) {
str = ProjectSettings::get_singleton()->get(prop);