Age | Commit message (Collapse) | Author |
|
|
|
|
|
A subsequent commit will add to_utf8 back to create an AK::String.
|
|
This could fail to allocate the underlying storage needed to store the
UTF-8 data. Propagate this error.
|
|
These could fail to allocate the underlying storage needed to store the
UTF-16 data. Propagate these errors.
|
|
Instead of writing out "Vector<u16, 1>" everywhere, let's have a name
for it.
|
|
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 :^)
|
|
|
|
This helper can be used to used to retrieve the code unit offset of an
active Utf16CodePointIterator efficiently.
|
|
|
|
|
|
|
|
It's very common to encounter single-character strings in JavaScript on
the web. We can make such strings significantly lighter by having a
1-character inline capacity on the Vectors.
|
|
Most of String.prototype and RegExp.prototype is implemented with UTF-16
so this is to prevent extra copying of the string data.
|
|
The current method of iterating through the string to access a code
point hurts performance quite badly for very large strings. The test262
test "RegExp/property-escapes/generated/Any.js" previously took 3 hours
to complete; this one change brings it down to under 10 seconds.
|
|
This will work for ASCII code points. Unicode case folding will be
needed for non-ASCII.
|
|
To be used as a RegexStringView variant, Utf16View must provide a couple
more helper methods. It must also not default its assignment operators,
because that implicitly deletes move/copy constructors.
|
|
Also includes a way to transcode from and to UTF-8 strings.
|