mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
AK: Remove unused ByteString titlecase/invert case conversions
This commit is contained in:
parent
c8bb3030fd
commit
05627b6f45
Notes:
github-actions[bot]
2025-04-07 15:45:57 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/05627b6f45f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4253
4 changed files with 0 additions and 27 deletions
|
@ -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)
|
||||
|
|
|
@ -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); }
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue