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

Merge pull request #57562 from AnilBK/string-add-contains

String: Add contains().
This commit is contained in:
Rémi Verschelde
2022-02-03 22:21:24 +01:00
committed by GitHub
57 changed files with 142 additions and 119 deletions

View File

@@ -182,7 +182,7 @@ static String _mkid(const String &p_id) {
static String f2sp0(float p_float) {
String num = rtoss(p_float);
if (num.find(".") == -1 && num.find("e") == -1) {
if (!num.contains(".") && !num.contains("e")) {
num += ".0";
}
return num;