summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
Diffstat (limited to 'core/string')
-rw-r--r--core/string/ustring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp
index 7cd1a39d38..3d37e17ef8 100644
--- a/core/string/ustring.cpp
+++ b/core/string/ustring.cpp
@@ -3964,7 +3964,7 @@ String String::format(const Variant &values, const String &placeholder) const {
Variant v_val = values_arr[i];
String val = v_val;
- if (placeholder.find("_") > -1) {
+ if (placeholder.contains("_")) {
new_string = new_string.replace(placeholder.replace("_", i_as_str), val);
} else {
new_string = new_string.replace_first(placeholder, val);