diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-03 22:21:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 22:21:24 +0100 |
commit | f8f19b313d62b707467c54d245b9c3e0ad53f34f (patch) | |
tree | 975f9c64fe51c3809c7c3b2eb0cd46d3563d2bd2 /scene/gui/code_edit.cpp | |
parent | 025e778020dde6dcee89f5ae1e2a63ccddc24340 (diff) | |
parent | adbe948bda202209b55249198e1837324e703ddb (diff) |
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
Diffstat (limited to 'scene/gui/code_edit.cpp')
-rw-r--r-- | scene/gui/code_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 22def607ed..7e21a43ab6 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -232,7 +232,7 @@ void CodeEdit::_notification(int p_what) { int begin = 0; int end = 0; - if (line.find(String::chr(0xFFFF)) != -1) { + if (line.contains(String::chr(0xFFFF))) { begin = font->get_string_size(line.substr(0, line.find(String::chr(0xFFFF))), font_size).x; end = font->get_string_size(line.substr(0, line.rfind(String::chr(0xFFFF))), font_size).x; } |