AK+Everywhere: Change StringView case conversions to return String

There's a bit of a UTF-8 assumption with this change. But nearly every
caller of these methods were immediately creating a String from the
resulting ByteString anyways.
This commit is contained in:
Timothy Flynn 2025-04-06 10:19:35 -04:00 committed by Andreas Kling
commit 0a256b0a9a
Notes: github-actions[bot] 2025-04-07 15:45:50 +00:00
15 changed files with 57 additions and 56 deletions

View file

@ -527,10 +527,8 @@ static ErrorOr<String> domain_to_ascii(StringView domain, bool be_strict)
}
}
if (!slow_path) {
auto lowercase_domain = domain.to_lowercase_string();
return String::from_utf8_without_validation(lowercase_domain.bytes());
}
if (!slow_path)
return domain.to_ascii_lowercase_string();
}
Unicode::IDNA::ToAsciiOptions const options {