From fc0a8e668aef4360b6a8ed780dd15c2e80fc70f9 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 12 Apr 2024 00:16:49 +0200 Subject: Add uprop_get_uc() --- include/unicode/prop.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/unicode/prop.h b/include/unicode/prop.h index ebbc817..f58118d 100644 --- a/include/unicode/prop.h +++ b/include/unicode/prop.h @@ -2,10 +2,22 @@ #define MLIB_UNICODE_PROP_H #include +#include #include "__rune.h" #include "__u8view.h" +struct rview { + const rune *p; + size_t len; +}; + +struct ucctx { + bool az_or_tr : 1; /* Azeri or Turkish */ + bool cap_eszett : 1; /* Use capital eszett */ + bool lt_after_i : 1; /* After ā€˜iā€™ in Lithuanian */ +}; + enum uprop_bpt { BPT_N, /* None */ BPT_C, /* Close */ @@ -156,6 +168,7 @@ enum uprop_nt { [[__mlib_uprop_attrs]] rune uprop_get_slc(rune); [[__mlib_uprop_attrs]] rune uprop_get_stc(rune); [[__mlib_uprop_attrs]] rune uprop_get_suc(rune); +[[__mlib_uprop_attrs]] struct rview uprop_get_uc(rune, struct ucctx); [[__mlib_uprop_attrs]] struct u8view uprop_get_na1(rune); [[__mlib_uprop_attrs]] struct u8view uprop_get_na(rune); -- cgit v1.2.3