1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

Utilities: Replace ctype.h usage with AK/CharacterTypes.h

This commit is contained in:
Sam Atkins 2023-03-09 17:37:16 +00:00 committed by Andreas Kling
parent ee4e9b807a
commit 0f95ff64ed
14 changed files with 51 additions and 41 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/CharacterTypes.h>
#include <AK/DeprecatedString.h>
#include <AK/GenericLexer.h>
#include <AK/JsonArray.h>
@ -38,8 +39,8 @@ static bool parse_name(StringView name, OpenFile& file)
return true;
} else {
file.type = component1;
auto component2 = lexer.consume_while([](char c) { return isprint(c) && c != '('; });
lexer.ignore_while(isspace);
auto component2 = lexer.consume_while([](char c) { return is_ascii_printable(c) && c != '('; });
lexer.ignore_while(is_ascii_space);
file.name = component2;
if (lexer.tell_remaining() == 0) {