mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
AK: Add invert_case() and invert_case(StringView)
In the given String, invert_case() swaps lowercase characters with uppercase ones and vice versa.
This commit is contained in:
parent
b1709c368f
commit
8ffa860bc3
Notes:
sideshowbarker
2024-07-17 10:37:41 +09:00
Author: https://github.com/huttongrabiel
Commit: 8ffa860bc3
Pull-request: https://github.com/SerenityOS/serenity/pull/14105
Reviewed-by: https://github.com/2xsaiko
4 changed files with 21 additions and 0 deletions
|
@ -388,6 +388,11 @@ String String::to_titlecase() const
|
|||
return StringUtils::to_titlecase(*this);
|
||||
}
|
||||
|
||||
String String::invert_case() const
|
||||
{
|
||||
return StringUtils::invert_case(*this);
|
||||
}
|
||||
|
||||
bool operator<(char const* characters, String const& string)
|
||||
{
|
||||
return string.view() > characters;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue