mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +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
Notes:
sideshowbarker
2024-07-18 05:16:02 +09:00
Author: https://github.com/trflynn89
Commit: 262e412634
Pull-request: https://github.com/SerenityOS/serenity/pull/9599
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
7 changed files with 43 additions and 0 deletions
|
@ -85,6 +85,7 @@ public:
|
|||
|
||||
[[nodiscard]] String to_lowercase_string() const;
|
||||
[[nodiscard]] String to_uppercase_string() const;
|
||||
[[nodiscard]] String to_titlecase_string() const;
|
||||
|
||||
[[nodiscard]] Optional<size_t> find(char needle, size_t start = 0) const { return StringUtils::find(*this, needle, start); }
|
||||
[[nodiscard]] Optional<size_t> find(StringView const& needle, size_t start = 0) const { return StringUtils::find(*this, needle, start); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue