summaryrefslogtreecommitdiff
path: root/AK/String.h
AgeCommit message (Collapse)Author
2020-01-22AK: Also add a keep_empty argument to String::split[_limit]()Sergey Bugaev
Just like String[View]::split_view() has already.
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.
2020-01-06AK+Demos+Libraries: Remove executable permissions from {.cpp,.h} filesShannon Booth
2019-12-18AK: Add String::equals_ignoring_case(StringView)Andreas Kling
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-10-28AK: Add String::contains(String)Andreas Kling
This is just a wrapper around strstr() for now. There are many better ways to search for a string within a string, but I'm just adding a nice API at the moment. :^)
2019-10-18AK: Add String::hash()Andreas Kling
2019-10-07AK: Make String compile on platforms where size_t==u32Andreas Kling
This kind of thing is a bit annoying. On Serenity, size_t is the same size as u32, but not the same type. Because of "long" or whatever. This patch makes String not complain about duplicate overloads.
2019-09-28AK: Add a keep_empty argument to String[View]::substring{_view}Sergey Bugaev
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-09-11AK: Add String::number(size_t) overloadAndreas Kling
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2018-12-04Import a simple text editor I started working on.Andreas Kling
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-31Add getpwent() family of functions to LibC.Andreas Kling
Also add a little /etc/passwd database. There's just me in there.
2018-10-28Add a simple FileSystemPath class that can canonicalize paths.Andreas Kling
Also a simple StringBuilder to help him out.
2018-10-26Add sys$gethostname and /bin/hostnameAndreas Kling
2018-10-24Add a "pwd" utility to userland.Andreas Kling
It's implemented as a separate process. How cute is that. Tasks now have a current working directory. Spawned tasks inherit their parent task's working directory. Currently everyone just uses "/" as there's no way to chdir().
2018-10-17Integrate ext2 from VFS into Kernel.Andreas Kling
2018-10-16Add String::substring().Andreas Kling
2018-10-10Import all this stuff into a single repo called Serenity.Andreas Kling