summaryrefslogtreecommitdiff
path: root/AK/StringImpl.cpp
AgeCommit message (Collapse)Author
2020-02-25AK: Have AK/kmalloc.h #include <new> on other platformsAndreas Kling
This should make stuff like placement new work correctly when building outside of Serenity. This stuff is a bit delicate due to the weirdly staged toolchain build at the moment. Hopefully we can unify this stuff in the future.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
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.
2019-09-13Revert "AK: Made Strings reversible"Andreas Kling
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.
2019-09-13AK: Made Strings reversibleJesse Buhagiar
`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.
2019-06-24StringImpl: Fix possible uninitialized access in StringImpl::create().Andreas Kling
If the provided length is 0, there's no need to dereference the const char*.
2019-06-21AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.Andreas Kling
2019-06-20AK: Make StringImpl a bit smaller.Andreas Kling
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. :^)
2019-06-14AK: Massage it into building on my host system without breaking Serenity.Andreas Kling
2019-05-28Add clang-format fileRobin Burchell
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.
2019-04-07AK: Improve StringImpl chomping a bit.Andreas Kling
Chomp off any number of trailing [\0\n\r] characters and trim the allocation to fit instead of keeping the original size.
2019-03-12Kernel: Cache MAC<->IP mappings (from ARP responses) seen on the wire.Andreas Kling
2019-02-25More moving towards using signed types.Andreas Kling
I'm still feeling this out, but I am starting to like the general idea.
2019-02-25Convert more RetainPtr use to Retained.Andreas Kling
2019-02-17AK: Fix broken instrumentation code for StringImpl.Andreas Kling
2019-02-06Bootloader: Locate the kernel's data segment and clear it.Andreas Kling
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! :^)
2019-02-03Get nyancat nyanning in Serenity.Andreas Kling
I found a cute program that renders an animated nyancat in the terminal. This patch adds enough hackery to get it working correctly. :^)
2019-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2018-12-28Plug leaks in SynthFS::remove_file().Andreas Kling
The process spawn stress test can now run forever. :^)
2018-12-21Yet another pass of style fixes.Andreas Kling
2018-12-04Import a simple text editor I started working on.Andreas Kling
2018-11-09Make kernel build with clang.Andreas Kling
It's a bit faster than g++ and seems to generate perfectly fine code. The kernel is also roughly 10% smaller(!)
2018-11-07Add a Chomp feature to String construction that removes a trailing newline.Andreas Kling
This will be useful in many situations.
2018-10-22Add a CircularQueue template class to AK.Andreas Kling
2018-10-22Oops, StringImpl's "the empty string" global was not always initialized.Andreas Kling
These "oops forgot to initialize" bugs are getting annoying...
2018-10-17Integrate ext2 from VFS into Kernel.Andreas Kling
2018-10-16Reduce dependence on STL.Andreas Kling
2018-10-10Import all this stuff into a single repo called Serenity.Andreas Kling