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

Add contains_char() for single-character 'contains' calls.

This commit is contained in:
Lukas Tenbrink
2024-12-05 17:56:08 +01:00
parent eb5103093c
commit b5c31ebb41
61 changed files with 108 additions and 99 deletions

View File

@@ -181,7 +181,7 @@ static String _mkid(const String &p_id) {
static String f2sp0(float p_float) {
String num = rtos(p_float);
if (!num.contains(".") && !num.contains("e")) {
if (!num.contains_char('.') && !num.contains_char('e')) {
num += ".0";
}
return num;