summaryrefslogtreecommitdiff
path: root/AK/StringImpl.h
AgeCommit message (Collapse)Author
2020-12-30AK+Format: Remove TypeErasedFormatParams& from format function.asynts
2020-11-29AK: Export ShouldChomp::NoChomp tooAnotherTest
It's much more elegant to say 'should_chomp ? Chomp : NoChomp' than to say 'if (should_chomp) ...(..., Chomp) else ...(...)'.
2020-10-20Everywhere: Redundant inline specifier on constexpr functions (#3807)Lenny Maiorani
Problem: - `constexpr` functions are decorated with the `inline` specifier keyword. This is redundant because `constexpr` functions are implicitly `inline`. - [dcl.constexpr], ยง7.1.5/2 in the C++11 standard): "constexpr functions and constexpr constructors are implicitly inline (7.1.2)". Solution: - Remove the redundant `inline` keyword.
2020-10-08AK: Add formatter for StringImpl.asynts
2020-10-05AK: Move StringImpl::operator== implementation into StringImplNico Weber
2020-08-24AK: Document that String{,Impl} contains NUL-terminatorBen Wiederhake
2020-08-06AK: Add String constructor from ReadonlyBytes.asynts
2020-07-27AK: Add span() / bytes() methods to container types.asynts
2020-04-13AK: Let FlyString::hash() assume that the string was already hashedAndreas Kling
Since the FlyString deduplication mechanism uses a HashTable, we know that any StringImpl inside a non-null FlyString will already have its lazily computed hash.
2020-03-22AK: Add FlyString, a simple flyweight string classAndreas Kling
FlyString is a flyweight string class that wraps a RefPtr<StringImpl> known to be unique among the set of FlyStrings. The class is very unoptimized at the moment. When to use FlyString: - When you want O(1) string comparison - When you want to deduplicate a lot of identical strings When not to use FlyString: - For strings that don't need either of the above features - For strings that are likely to be unique
2020-03-10AK: Add begin() and end() to String and StringViewhowar6hill
Now it's possible to use range-based for loops with String and StringView.
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-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-06-24AK: Mark some helper things constexpr.Andreas Kling
2019-06-21AK: Rename Retainable.h => RefCounted.h.Andreas Kling
2019-06-21AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h.Andreas Kling
2019-06-21AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.Andreas Kling
2019-06-21AK: Rename Retainable => RefCounted.Andreas Kling
(And various related renames that go along with it.)
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-18AK: Override StringImpl's operator delete to silence valgrind.Andreas Kling
2019-06-07Meta: Tweak .clang-format to not wrap braces after enums.Andreas Kling
2019-06-07AK: Run clang-format on everything.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-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-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! :^)
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-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-22Oops, StringImpl's "the empty string" global was not always initialized.Andreas Kling
These "oops forgot to initialize" bugs are getting annoying...
2018-10-16Reduce dependence on STL.Andreas Kling
2018-10-10Import all this stuff into a single repo called Serenity.Andreas Kling