summaryrefslogtreecommitdiff
path: root/AK/FlyString.h
AgeCommit message (Collapse)Author
2020-07-28AK: Tweak String::is_one_of() and FlyString::is_one_of()Andreas Kling
Switch the comparisons from "other == *this" to "*this == other".
2020-07-21AK: Add case insensitive version of starts_withLuke
2020-06-12AK: Make string-to-number conversion helpers return OptionalAndreas Kling
Get rid of the weird old signature: - int StringType::to_int(bool& ok) const And replace it with sensible new signature: - Optional<int> StringType::to_int() const
2020-05-30AK: Make {String,FlyString}::is_one_of() constAndreas Kling
Also, make the zero-argument variant private since it's not meant to be called by clients directly.
2020-05-26AK: Unify FlyString/StringView::ends_with implementation on ↵Brian Gianforcaro
StringUtils::ends_with This creates a unified implementation of ends_with with case sensitivity across String/StringView/FlyString.
2020-05-25AK: Add String::is_one_of(...)Andreas Kling
This allows you to compare a string against an arbitrary number of other strings with a single call.
2020-05-05AK: Some FlyString improvementsAndreas Kling
We're now clever enough to notice when we're constructing a FlyString from a String that is actually already a FlyString. :^)
2020-04-30AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macrosAndreas Kling
It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
2020-04-16AK: Add FlyString::is_empty()Andreas Kling
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-04-10AK: Add FlyString::hash()Andreas Kling
2020-03-28AK: Add some string comparison operatorsAndreas Kling
Some of these are very inefficient. It's nice to have some optimization opportunities in the future though. :^)
2020-03-24AK: Add FlyString::is_null()Andreas Kling
2020-03-23AK: Reduce header dependency graph of String.hAndreas Kling
String.h no longer pulls in StringView.h. We do this by moving a bunch of String functions out-of-line.
2020-03-22AK: Add FlyString::to_lowercase() and LogStream operator<<(FlyString)Andreas Kling
2020-03-22AK: Add FlyString::equals_ignoring_case(StringView)Andreas Kling
And share the code with String by moving the logic to StringUtils. :^)
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