Age | Commit message (Collapse) | Author |
|
Using int was a mistake. This patch changes String, StringImpl,
StringView and StringBuilder to use size_t instead of int for lengths.
Obviously a lot of code needs to change as a result of this.
|
|
This reverts commit 26e81ad574d463faee19f5973108f80d0e02aaf6.
We forgot to consider UTF-8 here. String is UTF-8 and we need to be
careful about things like this.
|
|
`AK::String` can now be reversed via AK::String::reverse(). This makes
life a lot easier for functions like `itoa()`, where the output
ends up being backwards. Very much not like the normal STL
(which requires an `std::reverse` object) way of doing things.
A call to reverse returns a new `AK::String` so as to not upset any
of the possible references to the same `StringImpl` shared between
Strings.
|
|
If the provided length is 0, there's no need to dereference the const char*.
|
|
|
|
There's no need for a member char* m_characters if we always store them
in the inline buffer. So with this patch, we now do.
After that, rearrange the members a bit for ideal packing. :^)
|
|
|
|
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
|
|
Chomp off any number of trailing [\0\n\r] characters and trim the allocation
to fit instead of keeping the original size.
|
|
|
|
I'm still feeling this out, but I am starting to like the general idea.
|
|
|
|
|
|
This was a constant source of stupid bugs and I kept postponing it because
I wasn't in the mood to write assembly code. Until now! :^)
|
|
I found a cute program that renders an animated nyancat in the terminal.
This patch adds enough hackery to get it working correctly. :^)
|
|
|
|
The process spawn stress test can now run forever. :^)
|
|
|
|
|
|
It's a bit faster than g++ and seems to generate perfectly fine code.
The kernel is also roughly 10% smaller(!)
|
|
This will be useful in many situations.
|
|
|
|
These "oops forgot to initialize" bugs are getting annoying...
|
|
|
|
|
|
|