LibWeb: Remove Web::Infra ASCII case conversion methods

We have more optimized versions of these methods in AK.
This commit is contained in:
Timothy Flynn 2025-05-04 09:02:58 -04:00 committed by Andreas Kling
parent d048ee3155
commit 1c075d6039
Notes: github-actions[bot] 2025-05-04 14:00:17 +00:00
5 changed files with 4 additions and 34 deletions

View file

@ -118,7 +118,7 @@ Optional<MimeType> MimeType::parse(StringView string)
return OptionalNone {};
// 10. Let mimeType be a new MIME type record whose type is type, in ASCII lowercase, and subtype is subtype, in ASCII lowercase.
auto mime_type = MimeType::create(MUST(Infra::to_ascii_lowercase(type)), MUST(Infra::to_ascii_lowercase(subtype)));
auto mime_type = MimeType::create(type.to_ascii_lowercase_string(), subtype.to_ascii_lowercase_string());
// 11. While position is not past the end of input:
while (!lexer.is_eof()) {
@ -134,7 +134,7 @@ Optional<MimeType> MimeType::parse(StringView string)
});
// 4. Set parameterName to parameterName, in ASCII lowercase.
auto parameter_name = MUST(Infra::to_ascii_lowercase(parameter_name_view));
auto parameter_name = parameter_name_view.to_ascii_lowercase_string();
// 5. If position is not past the end of input, then:
if (!lexer.is_eof()) {