mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +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
|
@ -50,7 +50,7 @@ public:
|
|||
#ifndef KERNEL
|
||||
StringView(String const&);
|
||||
StringView(FlyString const&);
|
||||
StringView(DeprecatedString const&);
|
||||
StringView(ByteString const&);
|
||||
StringView(DeprecatedFlyString const&);
|
||||
#endif
|
||||
|
||||
|
@ -58,11 +58,11 @@ public:
|
|||
#ifndef KERNEL
|
||||
explicit StringView(String&&) = delete;
|
||||
explicit StringView(FlyString&&) = delete;
|
||||
explicit StringView(DeprecatedString&&) = delete;
|
||||
explicit StringView(ByteString&&) = delete;
|
||||
explicit StringView(DeprecatedFlyString&&) = delete;
|
||||
#endif
|
||||
|
||||
template<OneOf<String, FlyString, DeprecatedString, DeprecatedFlyString, ByteBuffer> StringType>
|
||||
template<OneOf<String, FlyString, ByteString, DeprecatedFlyString, ByteBuffer> StringType>
|
||||
StringView& operator=(StringType&&) = delete;
|
||||
|
||||
[[nodiscard]] constexpr bool is_null() const
|
||||
|
@ -110,9 +110,9 @@ public:
|
|||
[[nodiscard]] StringView trim_whitespace(TrimMode mode = TrimMode::Both) const { return StringUtils::trim_whitespace(*this, mode); }
|
||||
|
||||
#ifndef KERNEL
|
||||
[[nodiscard]] DeprecatedString to_lowercase_string() const;
|
||||
[[nodiscard]] DeprecatedString to_uppercase_string() const;
|
||||
[[nodiscard]] DeprecatedString to_titlecase_string() const;
|
||||
[[nodiscard]] ByteString to_lowercase_string() const;
|
||||
[[nodiscard]] ByteString to_uppercase_string() const;
|
||||
[[nodiscard]] ByteString to_titlecase_string() const;
|
||||
#endif
|
||||
|
||||
[[nodiscard]] Optional<size_t> find(char needle, size_t start = 0) const
|
||||
|
@ -272,7 +272,7 @@ public:
|
|||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
bool operator==(DeprecatedString const&) const;
|
||||
bool operator==(ByteString const&) const;
|
||||
#endif
|
||||
|
||||
[[nodiscard]] constexpr int compare(StringView other) const
|
||||
|
@ -314,7 +314,7 @@ public:
|
|||
constexpr bool operator>=(StringView other) const { return compare(other) >= 0; }
|
||||
|
||||
#ifndef KERNEL
|
||||
[[nodiscard]] DeprecatedString to_deprecated_string() const;
|
||||
[[nodiscard]] ByteString to_byte_string() const;
|
||||
#endif
|
||||
|
||||
[[nodiscard]] bool is_whitespace() const
|
||||
|
@ -323,7 +323,7 @@ public:
|
|||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
[[nodiscard]] DeprecatedString replace(StringView needle, StringView replacement, ReplaceMode) const;
|
||||
[[nodiscard]] ByteString replace(StringView needle, StringView replacement, ReplaceMode) const;
|
||||
#endif
|
||||
[[nodiscard]] size_t count(StringView needle) const
|
||||
{
|
||||
|
@ -354,7 +354,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
friend class DeprecatedString;
|
||||
friend class ByteString;
|
||||
char const* m_characters { nullptr };
|
||||
size_t m_length { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue