mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
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')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -22,11 +22,11 @@ TEST_CASE(hash_compatible)
|
|||
static_assert(AK::Concepts::HashCompatible<FlyString, String>);
|
||||
static_assert(AK::Concepts::HashCompatible<FlyString, StringView>);
|
||||
|
||||
static_assert(AK::Concepts::HashCompatible<DeprecatedString, StringView>);
|
||||
static_assert(AK::Concepts::HashCompatible<DeprecatedString, DeprecatedFlyString>);
|
||||
static_assert(AK::Concepts::HashCompatible<StringView, DeprecatedString>);
|
||||
static_assert(AK::Concepts::HashCompatible<ByteString, StringView>);
|
||||
static_assert(AK::Concepts::HashCompatible<ByteString, DeprecatedFlyString>);
|
||||
static_assert(AK::Concepts::HashCompatible<StringView, ByteString>);
|
||||
static_assert(AK::Concepts::HashCompatible<StringView, DeprecatedFlyString>);
|
||||
static_assert(AK::Concepts::HashCompatible<DeprecatedFlyString, DeprecatedString>);
|
||||
static_assert(AK::Concepts::HashCompatible<DeprecatedFlyString, ByteString>);
|
||||
static_assert(AK::Concepts::HashCompatible<DeprecatedFlyString, StringView>);
|
||||
|
||||
static_assert(AK::Concepts::HashCompatible<StringView, ByteBuffer>);
|
||||
|
@ -328,7 +328,7 @@ TEST_CASE(convert_to_floating_point)
|
|||
|
||||
TEST_CASE(ends_with)
|
||||
{
|
||||
DeprecatedString test_string = "ABCDEF";
|
||||
ByteString test_string = "ABCDEF";
|
||||
EXPECT(AK::StringUtils::ends_with(test_string, "DEF"sv, CaseSensitivity::CaseSensitive));
|
||||
EXPECT(AK::StringUtils::ends_with(test_string, "ABCDEF"sv, CaseSensitivity::CaseSensitive));
|
||||
EXPECT(!AK::StringUtils::ends_with(test_string, "ABCDE"sv, CaseSensitivity::CaseSensitive));
|
||||
|
@ -339,7 +339,7 @@ TEST_CASE(ends_with)
|
|||
|
||||
TEST_CASE(starts_with)
|
||||
{
|
||||
DeprecatedString test_string = "ABCDEF";
|
||||
ByteString test_string = "ABCDEF";
|
||||
EXPECT(AK::StringUtils::starts_with(test_string, "ABC"sv, CaseSensitivity::CaseSensitive));
|
||||
EXPECT(AK::StringUtils::starts_with(test_string, "ABCDEF"sv, CaseSensitivity::CaseSensitive));
|
||||
EXPECT(!AK::StringUtils::starts_with(test_string, "BCDEF"sv, CaseSensitivity::CaseSensitive));
|
||||
|
@ -350,7 +350,7 @@ TEST_CASE(starts_with)
|
|||
|
||||
TEST_CASE(contains)
|
||||
{
|
||||
DeprecatedString test_string = "ABCDEFABCXYZ";
|
||||
ByteString test_string = "ABCDEFABCXYZ";
|
||||
EXPECT(AK::StringUtils::contains(test_string, "ABC"sv, CaseSensitivity::CaseSensitive));
|
||||
EXPECT(AK::StringUtils::contains(test_string, "ABC"sv, CaseSensitivity::CaseInsensitive));
|
||||
EXPECT(AK::StringUtils::contains(test_string, "AbC"sv, CaseSensitivity::CaseInsensitive));
|
||||
|
@ -368,7 +368,7 @@ TEST_CASE(contains)
|
|||
EXPECT(!AK::StringUtils::contains(test_string, "L"sv, CaseSensitivity::CaseSensitive));
|
||||
EXPECT(!AK::StringUtils::contains(test_string, "L"sv, CaseSensitivity::CaseInsensitive));
|
||||
|
||||
DeprecatedString command_palette_bug_string = "Go Go Back";
|
||||
ByteString command_palette_bug_string = "Go Go Back";
|
||||
EXPECT(AK::StringUtils::contains(command_palette_bug_string, "Go Back"sv, AK::CaseSensitivity::CaseSensitive));
|
||||
EXPECT(AK::StringUtils::contains(command_palette_bug_string, "gO bAcK"sv, AK::CaseSensitivity::CaseInsensitive));
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ TEST_CASE(trim)
|
|||
|
||||
TEST_CASE(find)
|
||||
{
|
||||
DeprecatedString test_string = "1234567";
|
||||
ByteString test_string = "1234567";
|
||||
EXPECT_EQ(AK::StringUtils::find(test_string, "1"sv).value_or(1), 0u);
|
||||
EXPECT_EQ(AK::StringUtils::find(test_string, "2"sv).value_or(2), 1u);
|
||||
EXPECT_EQ(AK::StringUtils::find(test_string, "3"sv).value_or(3), 2u);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue