mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
AK+LibUnicode: Expose TrailingCodePointTransformation in to_titlecase
Relocating the definition of this enum from LibUnicode to AK.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/6b32a1f18f Pull-request: https://github.com/SerenityOS/serenity/pull/22057 Reviewed-by: https://github.com/trflynn89
@@ -54,6 +54,13 @@ enum class SplitBehavior : unsigned {
|
||||
};
|
||||
AK_ENUM_BITWISE_OPERATORS(SplitBehavior);
|
||||
|
||||
enum class TrailingCodePointTransformation : u8 {
|
||||
// Default behaviour; Puts the first typographic letter unit of each word, if lowercase, in titlecase; the other characters in lowercase.
|
||||
Lowercase,
|
||||
// Puts the first typographic letter unit of each word, if lowercase, in titlecase; other characters are unaffected. (https://drafts.csswg.org/css-text/#valdef-text-transform-capitalize)
|
||||
PreserveExisting,
|
||||
};
|
||||
|
||||
struct MaskSpan {
|
||||
size_t start;
|
||||
size_t length;
|
||||
@@ -117,6 +124,7 @@ size_t count(StringView, char needle);
|
||||
using AK::CaseSensitivity;
|
||||
using AK::ReplaceMode;
|
||||
using AK::SplitBehavior;
|
||||
using AK::TrailingCodePointTransformation;
|
||||
using AK::TrimMode;
|
||||
using AK::TrimWhitespace;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user