mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
Utilities: Replace ctype.h usage with AK/CharacterTypes.h
This commit is contained in:
parent
ee4e9b807a
commit
0f95ff64ed
Notes:
sideshowbarker
2024-07-17 08:43:11 +09:00
Author: https://github.com/AtkinsSJ
Commit: 0f95ff64ed
Pull-request: https://github.com/SerenityOS/serenity/pull/17793
Reviewed-by: https://github.com/krkk
Reviewed-by: https://github.com/trflynn89
14 changed files with 51 additions and 41 deletions
|
@ -5,6 +5,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/QuickSort.h>
|
||||
|
@ -13,7 +14,6 @@
|
|||
#include <LibCore/File.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <ctype.h>
|
||||
|
||||
struct Line {
|
||||
StringView key;
|
||||
|
@ -74,7 +74,7 @@ static ErrorOr<void> load_file(Options options, StringView filename, Vector<Line
|
|||
if (options.key_field != 0) {
|
||||
auto split = (options.separator[0])
|
||||
? line.split_view(options.separator[0])
|
||||
: line.split_view(isspace);
|
||||
: line.split_view(is_ascii_space);
|
||||
if (options.key_field - 1 >= split.size()) {
|
||||
key = ""sv;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue