mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:54:58 +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
|
@ -13,8 +13,8 @@
|
|||
#include <AK/Vector.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
# include <AK/ByteString.h>
|
||||
# include <AK/DeprecatedFlyString.h>
|
||||
# include <AK/DeprecatedString.h>
|
||||
# include <AK/FlyString.h>
|
||||
# include <AK/String.h>
|
||||
#endif
|
||||
|
@ -34,7 +34,7 @@ StringView::StringView(FlyString const& string)
|
|||
{
|
||||
}
|
||||
|
||||
StringView::StringView(DeprecatedString const& string)
|
||||
StringView::StringView(ByteString const& string)
|
||||
: m_characters(string.characters())
|
||||
, m_length(string.length())
|
||||
{
|
||||
|
@ -176,17 +176,17 @@ bool StringView::equals_ignoring_ascii_case(StringView other) const
|
|||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
DeprecatedString StringView::to_lowercase_string() const
|
||||
ByteString StringView::to_lowercase_string() const
|
||||
{
|
||||
return StringImpl::create_lowercased(characters_without_null_termination(), length()).release_nonnull();
|
||||
}
|
||||
|
||||
DeprecatedString StringView::to_uppercase_string() const
|
||||
ByteString StringView::to_uppercase_string() const
|
||||
{
|
||||
return StringImpl::create_uppercased(characters_without_null_termination(), length()).release_nonnull();
|
||||
}
|
||||
|
||||
DeprecatedString StringView::to_titlecase_string() const
|
||||
ByteString StringView::to_titlecase_string() const
|
||||
{
|
||||
return StringUtils::to_titlecase(*this);
|
||||
}
|
||||
|
@ -257,14 +257,14 @@ Optional<float> StringView::to_float(TrimWhitespace trim_whitespace) const
|
|||
return StringUtils::convert_to_floating_point<float>(*this, trim_whitespace);
|
||||
}
|
||||
|
||||
bool StringView::operator==(DeprecatedString const& string) const
|
||||
bool StringView::operator==(ByteString const& string) const
|
||||
{
|
||||
return *this == string.view();
|
||||
}
|
||||
|
||||
DeprecatedString StringView::to_deprecated_string() const { return DeprecatedString { *this }; }
|
||||
ByteString StringView::to_byte_string() const { return ByteString { *this }; }
|
||||
|
||||
DeprecatedString StringView::replace(StringView needle, StringView replacement, ReplaceMode replace_mode) const
|
||||
ByteString StringView::replace(StringView needle, StringView replacement, ReplaceMode replace_mode) const
|
||||
{
|
||||
return StringUtils::replace(*this, needle, replacement, replace_mode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue