Timothy Flynn
1d9e226206
AK: Remove unused UTF-8 / other factory methods from ByteString
2025-04-07 17:44:38 +02:00
Timothy Flynn
3f439efe21
AK: Rename StringImpl to ByteStringImpl
...
StringImpl is very specific to ByteString. Let's rename it to match, to
avoid confusion with the StringBase and StringData classes.
2025-04-07 17:44:38 +02:00
Timothy Flynn
05627b6f45
AK: Remove unused ByteString titlecase/invert case conversions
2025-04-07 17:44:38 +02:00
Timothy Flynn
c8bb3030fd
AK: Return NonnullRefPtr from StringImpl::create methods
...
None of these return a nullptr.
2025-04-07 17:44:38 +02:00
Kenneth Myhra
82a2ae99c8
Everywhere: Remove DeprecatedFlyString + any remaining references to it
...
This reverts commit 7c32d1e8a5
.
2025-04-02 11:43:13 +02:00
Andreas Kling
7c32d1e8a5
Revert "Everywhere: Remove DeprecatedFlyString + any remaining references to it"
...
This reverts commit 3131e6369f
.
Greatly regressed JavaScript benchmark performance.
2025-04-01 15:40:27 +02:00
Kenneth Myhra
3131e6369f
Everywhere: Remove DeprecatedFlyString + any remaining references to it
2025-04-01 12:50:00 +02:00
stasoid
4180fe5b58
AK: Add default value for ByteString::find_any_of::direction
2025-02-06 15:15:16 -07:00
Jonne Ransijn
d842d04be4
AK: Remove DeprecatedStringCodePointIterator
...
The functionality in this class is no longer used, we can just use
`Utf8View` instead.
2024-11-14 23:06:42 +01:00
Andreas Kling
cc4b3cbacc
Meta: Update my e-mail address everywhere
2024-10-04 13:19:50 +02:00
Timothy Flynn
c5c5e52c24
AK: Disallow calling ByteString methods that return a view on rvalues
...
This prevents, for example:
StringView view = ByteString { "foo" }.view();
This prevents a class of potential UAF.
2024-04-04 11:23:21 +02:00
Dan Klishch
8ac0e3f0e5
AK+LibJS: Remove null state from DeprecatedFlyString :^)
2024-02-24 15:06:52 -07:00
Dan Klishch
061f902f95
AK+Userland: Introduce ByteString::create_and_overwrite
...
And replace two users of raw StringImpl with it.
2024-02-24 15:06:52 -07:00
Timothy Flynn
9cab4958e6
AK: Convert a couple String-related declarations to east-const
...
Caught by clang-format-17. Note that clang-format-16 is fine with this
as well (it leaves the const placement alone), it just doesn't perform
the formatting to east-const itself.
2024-01-04 11:28:03 -05:00
Shannon Booth
d51f84501a
AK: Remove now unused to_{int,uint,float,double} String functions
2023-12-23 20:41:07 +01:00
Shannon Booth
159eda5c6d
AK: Add ByteString::to_number<T>
...
To mirror the API with StringView and String.
2023-12-23 20:41:07 +01:00
Andreas Kling
9f0aa08468
AK: Add ByteString::from_utf8_without_validation()
...
This will be used by Jakt to create ByteString from string literals
which we can validate at compile time instead of runtime. :^)
2023-12-21 13:49:41 +01:00
Andreas Kling
b27a62488c
AK: Add ByteString::must_from_utf8(StringView) for Jakt
2023-12-18 12:41:25 +01:00
Ali Mohammad Pur
5e1499d104
Everywhere: Rename {Deprecated => Byte}String
...
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).
This commit is auto-generated:
$ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
Meta Ports Ladybird Tests Kernel)
$ perl -pie 's/\bDeprecatedString\b/ByteString/g;
s/deprecated_string/byte_string/g' $xs
$ clang-format --style=file -i \
$(git diff --name-only | grep \.cpp\|\.h)
$ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30