mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
AK: Use an enum instead of a bool for String::replace(all_occurences)
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
This commit is contained in:
parent
b2454888e8
commit
7ceeb74535
47 changed files with 108 additions and 102 deletions
|
@ -105,7 +105,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (pager)
|
||||
pager_command = pager;
|
||||
else
|
||||
pager_command = String::formatted("less -P 'Manual Page {}({}) line %l?e (END):.'", StringView(name).replace("'", "'\\''"), StringView(section).replace("'", "'\\''"));
|
||||
pager_command = String::formatted("less -P 'Manual Page {}({}) line %l?e (END):.'", StringView(name).replace("'", "'\\''", ReplaceMode::FirstOnly), StringView(section).replace("'", "'\\''", ReplaceMode::FirstOnly));
|
||||
pid_t pager_pid = TRY(pipe_to_pager(pager_command));
|
||||
|
||||
auto file = TRY(Core::File::open(filename, Core::OpenMode::ReadOnly));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue