1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

AK+LibUnicode: Expose TrailingCodePointTransformation in to_titlecase

Relocating the definition of this enum from LibUnicode to AK.
This commit is contained in:
Shannon Booth 2023-11-27 20:56:50 +13:00 committed by Tim Flynn
parent af7df1dbbf
commit 6b32a1f18f
6 changed files with 14 additions and 11 deletions

View file

@ -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