mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
This commit is contained in:
parent
03cc45e5a2
commit
a504ac3e2a
76 changed files with 480 additions and 476 deletions
|
@ -44,7 +44,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
TRY(Core::System::pledge("stdio rpath wpath recvfd thread"));
|
||||
|
||||
if (command.equals_ignoring_case("get"sv) || command == "g") {
|
||||
if (command.equals_ignoring_ascii_case("get"sv) || command == "g") {
|
||||
// Get variables
|
||||
Vector<AudioVariable> values_to_print;
|
||||
if (command_arguments.is_empty()) {
|
||||
|
@ -96,7 +96,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
if (!human_mode)
|
||||
outln();
|
||||
} else if (command.equals_ignoring_case("set"sv) || command == "s") {
|
||||
} else if (command.equals_ignoring_ascii_case("set"sv) || command == "s") {
|
||||
// Set variables
|
||||
HashMap<AudioVariable, Variant<int, bool>> values_to_set;
|
||||
for (size_t i = 0; i < command_arguments.size(); ++i) {
|
||||
|
@ -119,9 +119,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
} else if (variable.is_one_of("m"sv, "mute"sv)) {
|
||||
auto& mute_text = command_arguments[++i];
|
||||
bool mute;
|
||||
if (mute_text.equals_ignoring_case("true"sv) || mute_text == "1") {
|
||||
if (mute_text.equals_ignoring_ascii_case("true"sv) || mute_text == "1") {
|
||||
mute = true;
|
||||
} else if (mute_text.equals_ignoring_case("false"sv) || mute_text == "0") {
|
||||
} else if (mute_text.equals_ignoring_ascii_case("false"sv) || mute_text == "0") {
|
||||
mute = false;
|
||||
} else {
|
||||
warnln("Error: {} is not one of {{0, 1, true, false}}", mute_text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue