summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibUnicode
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-01-30 23:03:19 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-31 21:05:04 +0200
commit2d50c08f34a827acbccb84abaf81ce8a9a4005bb (patch)
tree7bef2dcc9a943f9358b796f9c478cc0755f0ecf7 /Userland/Libraries/LibUnicode
parent6efbafa6e07075c8f16639dac44c8c0cc0de21e1 (diff)
downloadserenity-2d50c08f34a827acbccb84abaf81ce8a9a4005bb.zip
LibUnicode: Download and parse {Grapheme,Word,Sentence} break props
Diffstat (limited to 'Userland/Libraries/LibUnicode')
-rw-r--r--Userland/Libraries/LibUnicode/CharacterTypes.cpp4
-rw-r--r--Userland/Libraries/LibUnicode/CharacterTypes.h4
-rw-r--r--Userland/Libraries/LibUnicode/Forward.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Libraries/LibUnicode/CharacterTypes.cpp b/Userland/Libraries/LibUnicode/CharacterTypes.cpp
index c8dfbd180d..ace627530e 100644
--- a/Userland/Libraries/LibUnicode/CharacterTypes.cpp
+++ b/Userland/Libraries/LibUnicode/CharacterTypes.cpp
@@ -353,4 +353,8 @@ Optional<Script> __attribute__((weak)) script_from_string(StringView) { return {
bool __attribute__((weak)) code_point_has_script(u32, Script) { return {}; }
bool __attribute__((weak)) code_point_has_script_extension(u32, Script) { return {}; }
+bool __attribute__((weak)) code_point_has_grapheme_break_property(u32, GraphemeBreakProperty) { return {}; }
+bool __attribute__((weak)) code_point_has_word_break_property(u32, WordBreakProperty) { return {}; }
+bool __attribute__((weak)) code_point_has_sentence_break_property(u32, SentenceBreakProperty) { return {}; }
+
}
diff --git a/Userland/Libraries/LibUnicode/CharacterTypes.h b/Userland/Libraries/LibUnicode/CharacterTypes.h
index 1d5378fbf6..def59cd149 100644
--- a/Userland/Libraries/LibUnicode/CharacterTypes.h
+++ b/Userland/Libraries/LibUnicode/CharacterTypes.h
@@ -40,4 +40,8 @@ Optional<Script> script_from_string(StringView);
bool code_point_has_script(u32 code_point, Script script);
bool code_point_has_script_extension(u32 code_point, Script script);
+bool code_point_has_grapheme_break_property(u32 code_point, GraphemeBreakProperty property);
+bool code_point_has_word_break_property(u32 code_point, WordBreakProperty property);
+bool code_point_has_sentence_break_property(u32 code_point, SentenceBreakProperty property);
+
}
diff --git a/Userland/Libraries/LibUnicode/Forward.h b/Userland/Libraries/LibUnicode/Forward.h
index eb1efecca7..4da75e680d 100644
--- a/Userland/Libraries/LibUnicode/Forward.h
+++ b/Userland/Libraries/LibUnicode/Forward.h
@@ -22,6 +22,7 @@ enum class DateField : u8;
enum class DayPeriod : u8;
enum class Era : u8;
enum class GeneralCategory : u8;
+enum class GraphemeBreakProperty : u8;
enum class HourCycle : u8;
enum class HourCycleRegion : u8;
enum class Key : u8;
@@ -35,6 +36,7 @@ enum class NumericSymbol : u8;
enum class Property : u8;
enum class Script : u8;
enum class ScriptTag : u8;
+enum class SentenceBreakProperty : u8;
enum class StandardNumberFormatType : u8;
enum class Style : u8;
enum class Territory : u8;