Commit graph

11 commits

Author SHA1 Message Date
Andreas Kling
64bda6de2a LibWeb: Use equals_ignoring_ascii_case() in infra helper 2023-03-10 13:15:44 +01:00
Linus Groh
93ed1b59c8 LibWeb/Infra: Port strip_and_collapse_whitespace() to new String 2023-03-04 23:27:08 +00:00
Linus Groh
f65cbeef5c LibWeb/Infra: Rename to_ascii_{{lower,upper}_case => {lower,upper}case} 2023-03-04 22:42:42 +00:00
Kenneth Myhra
31a9bd2bfd LibWeb: Add to_ascii_upper_case() from the Infra spec
https://infra.spec.whatwg.org/#ascii-uppercase
2023-02-26 00:27:22 +01:00
Kenneth Myhra
2c1e15bd3b LibWeb: Add to_ascii_lower_case() from the Infra spec
https://infra.spec.whatwg.org/#ascii-lowercase
2023-02-26 00:27:22 +01:00
Sam Atkins
a419039bb2 LibWeb: Implement ASCII case-insensitive matching
While DeprecatedString and StringView use ASCII case-insensitivity when
matching, String uses the Unicode rules, so in order to match the spec,
we need to *not* use `String::equals_ignoring_case()`.

This function needs to be used everywhere that the spec refers to
an "ASCII case-insensitive match".
2023-02-15 12:48:26 -05:00
Kenneth Myhra
b74d5a423d LibWeb: Add convert string into scalar value from Infra spec 2023-02-12 00:18:09 +00:00
Timothy Flynn
1edb96376b AK+Everywhere: Make UTF-8 and UTF-32 to UTF-16 converters fallible
These could fail to allocate the underlying storage needed to store the
UTF-16 data. Propagate these errors.
2023-01-08 12:13:15 +01:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
networkException
ee27d8cdfd LibWeb: Add is_code_unit_prefix() function 2022-10-24 23:06:56 +01:00
Linus Groh
7760c00714 LibWeb: Move strip_and_collapse_whitespace() to Infra/
...and make it spec compliant by considering all ASCII whitespace,
greatly simplifying it in the process :^)
2022-10-02 21:32:49 +02:00