unicode: export bidi details
This commit is contained in:
parent
2097b64da5
commit
771e9850fc
1 changed files with 33 additions and 0 deletions
|
@ -94,6 +94,39 @@ export fn gc_code(v: gc) const str = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Bidirectional classification.
|
||||||
|
export type bidi = enum u8 {
|
||||||
|
UNKNOWN,
|
||||||
|
L,
|
||||||
|
LRE,
|
||||||
|
LRO,
|
||||||
|
R,
|
||||||
|
AL,
|
||||||
|
RLE,
|
||||||
|
RLO,
|
||||||
|
PDF,
|
||||||
|
EN,
|
||||||
|
ES,
|
||||||
|
ET,
|
||||||
|
AN,
|
||||||
|
CS,
|
||||||
|
NSM,
|
||||||
|
BN,
|
||||||
|
B,
|
||||||
|
S,
|
||||||
|
WS,
|
||||||
|
ON,
|
||||||
|
LRI,
|
||||||
|
RLI,
|
||||||
|
FSI,
|
||||||
|
PDI,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Returns the [[bidi]] classification corresponding to this rune.
|
||||||
|
export fn rune_bidi(rn: rune) bidi = {
|
||||||
|
return get_ucdrecord(rn).bidirectional: bidi;
|
||||||
|
};
|
||||||
|
|
||||||
// Unicode character Script attribute.
|
// Unicode character Script attribute.
|
||||||
export type script = enum u16 {
|
export type script = enum u16 {
|
||||||
COMMON, // Zyyy
|
COMMON, // Zyyy
|
||||||
|
|
Loading…
Reference in a new issue