AK: Remove unused ByteString titlecase/invert case conversions

This commit is contained in:
Timothy Flynn 2025-04-06 10:16:24 -04:00 committed by Andreas Kling
parent c8bb3030fd
commit 05627b6f45
Notes: github-actions[bot] 2025-04-07 15:45:57 +00:00
4 changed files with 0 additions and 27 deletions

View file

@ -371,16 +371,6 @@ ByteString ByteString::to_snakecase() const
return StringUtils::to_snakecase(*this);
}
ByteString ByteString::to_titlecase() const
{
return StringUtils::to_titlecase(*this);
}
ByteString ByteString::invert_case() const
{
return StringUtils::invert_case(*this);
}
bool ByteString::operator==(char const* cstring) const
{
if (!cstring)

View file

@ -136,8 +136,6 @@ public:
[[nodiscard]] ByteString to_lowercase() const;
[[nodiscard]] ByteString to_uppercase() const;
[[nodiscard]] ByteString to_snakecase() const;
[[nodiscard]] ByteString to_titlecase() const;
[[nodiscard]] ByteString invert_case() const;
[[nodiscard]] bool is_whitespace() const { return StringUtils::is_whitespace(*this); }

View file

@ -504,20 +504,6 @@ ByteString to_titlecase(StringView str)
return builder.to_byte_string();
}
ByteString invert_case(StringView str)
{
StringBuilder builder(str.length());
for (auto ch : str) {
if (is_ascii_lower_alpha(ch))
builder.append(to_ascii_uppercase(ch));
else
builder.append(to_ascii_lowercase(ch));
}
return builder.to_byte_string();
}
// Finishes the replacing algorithm once it is known that ita least one
// replacemnet is going to be done. Otherwise the caller may want to follow a
// different route to construct its output.

View file

@ -106,7 +106,6 @@ Optional<size_t> find_any_of(StringView haystack, StringView needles, SearchDire
ByteString to_snakecase(StringView);
ByteString to_titlecase(StringView);
ByteString invert_case(StringView);
ByteString replace(StringView, StringView needle, StringView replacement, ReplaceMode);
ErrorOr<String> replace(String const&, StringView needle, StringView replacement, ReplaceMode);