From b1859510ab0a3381e0a5bec3d896032fc5019147 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 13 Feb 2020 16:42:49 +0100 Subject: Change behavior of String.right --- editor/find_in_files.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editor/find_in_files.cpp') diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 4fa131e991..322dfc13a9 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -530,7 +530,7 @@ void FindInFilesDialog::_on_replace_text_entered(String text) { void FindInFilesDialog::_on_folder_selected(String path) { int i = path.find("://"); if (i != -1) { - path = path.right(i + 3); + path = path.substr(i + 3); } _folder_line_edit->set_text(path); } @@ -932,7 +932,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector continue; } - line = line.left(repl_begin) + new_text + line.right(repl_end); + line = line.left(repl_begin) + new_text + line.substr(repl_end); // keep an offset in case there are successive replaces in the same line offset += new_text.length() - (repl_end - repl_begin); } -- cgit v1.2.3