1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

AK: Add a consume_until(StringView) overload to GenericLexer

This allows us to skip a strlen call.
This commit is contained in:
Idan Horowitz 2022-01-24 23:25:53 +02:00 committed by Ali Mohammad Pur
parent 10b25d2a57
commit d49d2c7ec4
3 changed files with 18 additions and 1 deletions

View file

@ -356,7 +356,7 @@ String Preprocessor::remove_escaped_newlines(StringView value)
AK::StringBuilder processed_value;
GenericLexer lexer { value };
while (!lexer.is_eof()) {
processed_value.append(lexer.consume_until("\\\n"));
processed_value.append(lexer.consume_until("\\\n"sv));
}
return processed_value.to_string();
}