mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
5cf818e305
There are a couple of differences here due to using ICU: 1. Titlecasing behaves slightly differently. We previously transformed "123dollars" to "123Dollars", as we would use word segmentation to split a string into words, then transform the first cased character to titlecase. ICU doesn't go quite that far, and leaves the string as "123dollars". While this is a behavior change, the only user of this API is the `text-transform: capitalize;` CSS rule, and we now match the behavior of other browsers. 2. There isn't an API to compare strings with case insensitivity without allocating case-folded strings for both the left- and right-hand-side strings. Our implementation was previously allocation-free; however, in a benchmark, ICU is still ~1.4x faster.
26 lines
474 B
C++
26 lines
474 B
C++
/*
|
|
* Copyright (c) 2021-2024, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
namespace Unicode {
|
|
|
|
enum class BidirectionalClass : u8;
|
|
enum class EmojiGroup : u8;
|
|
enum class GeneralCategory : u8;
|
|
enum class GraphemeBreakProperty : u8;
|
|
enum class Property : u8;
|
|
enum class Script : u8;
|
|
enum class SentenceBreakProperty : u8;
|
|
enum class WordBreakProperty : u8;
|
|
|
|
struct CurrencyCode;
|
|
struct Emoji;
|
|
|
|
}
|