diff options
author | Anilforextra <anilforextra@gmail.com> | 2022-02-03 21:48:38 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2022-02-04 01:28:02 +0545 |
commit | adbe948bda202209b55249198e1837324e703ddb (patch) | |
tree | a7f424318e1d944e0564edb6fc55e8eabf266bd0 /core/io/file_access.cpp | |
parent | bf12719ccabcea9bf9b274f77511e02581678774 (diff) | |
download | redot-engine-adbe948bda202209b55249198e1837324e703ddb.tar.gz |
String: Add contains().
Diffstat (limited to 'core/io/file_access.cpp')
-rw-r--r-- | core/io/file_access.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp index bb92648484..86836454c5 100644 --- a/core/io/file_access.cpp +++ b/core/io/file_access.cpp @@ -538,7 +538,7 @@ void FileAccess::store_csv_line(const Vector<String> &p_values, const String &p_ for (int i = 0; i < size; ++i) { String value = p_values[i]; - if (value.find("\"") != -1 || value.find(p_delim) != -1 || value.find("\n") != -1) { + if (value.contains("\"") || value.contains(p_delim) || value.contains("\n")) { value = "\"" + value.replace("\"", "\"\"") + "\""; } if (i < size - 1) { |