mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:54:58 +00:00
AK: Implement method to convert a String/StringView to title case
This implementation preserves consecutive spaces in the orginal string.
This commit is contained in:
parent
d2af27d2d0
commit
262e412634
7 changed files with 43 additions and 0 deletions
|
@ -183,6 +183,11 @@ String StringView::to_uppercase_string() const
|
|||
return StringImpl::create_uppercased(characters_without_null_termination(), length());
|
||||
}
|
||||
|
||||
String StringView::to_titlecase_string() const
|
||||
{
|
||||
return StringUtils::to_titlecase(*this);
|
||||
}
|
||||
|
||||
StringView StringView::substring_view_starting_from_substring(const StringView& substring) const
|
||||
{
|
||||
const char* remaining_characters = substring.characters_without_null_termination();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue