mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
AK+LibUnicode: Expose TrailingCodePointTransformation in to_titlecase
Relocating the definition of this enum from LibUnicode to AK.
This commit is contained in:
parent
af7df1dbbf
commit
6b32a1f18f
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/shannonbooth
Commit: 6b32a1f18f
Pull-request: https://github.com/SerenityOS/serenity/pull/22057
Reviewed-by: https://github.com/trflynn89
6 changed files with 14 additions and 11 deletions
|
@ -28,10 +28,10 @@ ErrorOr<String> String::to_uppercase(Optional<StringView> const& locale) const
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
ErrorOr<String> String::to_titlecase(Optional<StringView> const& locale) const
|
||||
ErrorOr<String> String::to_titlecase(Optional<StringView> const& locale, TrailingCodePointTransformation trailing_code_point_transformation) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
TRY(Unicode::Detail::build_titlecase_string(code_points(), builder, locale, Unicode::TrailingCodePointTransformation::Lowercase));
|
||||
TRY(Unicode::Detail::build_titlecase_string(code_points(), builder, locale, trailing_code_point_transformation));
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue