← Standard library

UnicodeData

sealed class UnicodeData
import UnicodeData from Wax;

Bundled Unicode property, simple casing, grapheme, and interval queries. Prefer char and string methods for ordinary text operations. Lookup helpers exposing packed tables are low-level support for the text and regex implementations; offsets are code-point/table indices, not UTF-8 byte positions.

UnicodeData.wax:334

Inherits from object. Follow these links for inherited members.

Members

TiledLookupmethod

public static fn TiledLookup(uint32 c, uint32[] table) : uint32

Finds the low-byte value of the greatest packed table start not exceeding c. Supply a nonempty sorted table of (start << 8) | value entries covering c.

UnicodeData.wax:3303

Categorymethod

public static fn Category(uint32 c) : UnicodeCategory

Returns General_Category, or OtherNotAssigned for unassigned code points or values above U+10FFFF.

UnicodeData.wax:3321

CccOfmethod

public static fn CccOf(uint32 c) : uint8

Returns Canonical_Combining_Class, or zero for values above U+10FFFF. Class zero includes non-combining characters.

UnicodeData.wax:3333

MapCpmethod

public static fn MapCp(uint32 c, uint32[] from, uint32[] to) : uint32

Binary-searches parallel sorted source/destination mapping arrays. Returns c unchanged when absent. Arrays must have matching lengths.

UnicodeData.wax:3343

ToUpperCpmethod

public static fn ToUpperCp(uint32 c) : uint32

Applies the simple one-code-point uppercase mapping, leaving unmapped values unchanged. Does not perform expansions or contextual casing.

UnicodeData.wax:3362

ToLowerCpmethod

public static fn ToLowerCp(uint32 c) : uint32

Applies the simple one-code-point lowercase mapping, leaving unmapped values unchanged. Does not perform expansions or contextual casing.

UnicodeData.wax:3367

ScriptOfmethod

public static fn ScriptOf(uint32 c) : UnicodeScript

Returns the bundled Script property for a Unicode code point. Supply a value in [0, U+10FFFF].

UnicodeData.wax:3374

InRangesmethod

public static fn InRanges(uint32 c, uint32[] iv) : bool

Tests membership in sorted nonoverlapping inclusive [lo, hi] pairs. The array length must be even.

UnicodeData.wax:3392

SimpleFoldmethod

public static fn SimpleFold(uint32 c) : uint32

Applies the Unicode common/simple case-fold mapping. Returns unmapped values unchanged; does not expand to multiple code points.

UnicodeData.wax:3412

SpecialLookupmethod

public static fn SpecialLookup(uint32 c, uint32[] from, uint32[] pack) : int32

Searches parallel sorted source and packed mapping arrays. Returns -1 when absent, otherwise the corresponding packed entry. Supply matching array lengths.

UnicodeData.wax:3434

SpecialUpperLookupmethod

public static fn SpecialUpperLookup(uint32 c) : int32

Returns an unconditional multi-code-point casing mapping packed as (outputStart << 16) | outputLength, or -1 when absent. Use the matching OutAt function to read it; contextual rules are applied separately by string casing.

UnicodeData.wax:3451

SpecialLowerLookupmethod

public static fn SpecialLowerLookup(uint32 c) : int32

Returns an unconditional multi-code-point casing mapping packed as (outputStart << 16) | outputLength, or -1 when absent. Use the matching OutAt function to read it; contextual rules are applied separately by string casing.

UnicodeData.wax:3457

SpecialUpperOutAtmethod

public static fn SpecialUpperOutAt(int32 i) : uint32

Reads one code point from the packed special-casing output table. Use a validated range from the matching Lookup; an invalid index panics.

UnicodeData.wax:3462

SpecialLowerOutAtmethod

public static fn SpecialLowerOutAt(int32 i) : uint32

Reads one code point from the packed special-casing output table. Use a validated range from the matching Lookup; an invalid index panics.

UnicodeData.wax:3467

LocaleLookupmethod

public static fn LocaleLookup(uint32 c, uint32[] from, uint32[] pack, uint32[] cond) : int32

Searches parallel sorted locale mapping arrays. Returns -1 when absent, otherwise (condition << 24) | (outputStart << 16) | outputLength. The caller must test the context condition before using the output.

UnicodeData.wax:3483

LocaleLtUpperLookupmethod

public static fn LocaleLtUpperLookup(uint32 c) : int32

Returns the Lithuanian casing mapping packed as (condition << 24) | (outputStart << 16) | outputLength, or -1 when absent. Test the LocaleCondition before reading matching OutAt entries.

UnicodeData.wax:3504

LocaleLtLowerLookupmethod

public static fn LocaleLtLowerLookup(uint32 c) : int32

Returns the Lithuanian casing mapping packed as (condition << 24) | (outputStart << 16) | outputLength, or -1 when absent. Test the LocaleCondition before reading matching OutAt entries.

UnicodeData.wax:3510

LocaleTrUpperLookupmethod

public static fn LocaleTrUpperLookup(uint32 c) : int32

Returns the Turkish casing mapping packed as (condition << 24) | (outputStart << 16) | outputLength, or -1 when absent. Test the LocaleCondition before reading matching OutAt entries.

UnicodeData.wax:3516

LocaleTrLowerLookupmethod

public static fn LocaleTrLowerLookup(uint32 c) : int32

Returns the Turkish casing mapping packed as (condition << 24) | (outputStart << 16) | outputLength, or -1 when absent. Test the LocaleCondition before reading matching OutAt entries.

UnicodeData.wax:3522

LocaleAzUpperLookupmethod

public static fn LocaleAzUpperLookup(uint32 c) : int32

Returns the Azeri casing mapping packed as (condition << 24) | (outputStart << 16) | outputLength, or -1 when absent. Test the LocaleCondition before reading matching OutAt entries.

UnicodeData.wax:3528

LocaleAzLowerLookupmethod

public static fn LocaleAzLowerLookup(uint32 c) : int32

Returns the Azeri casing mapping packed as (condition << 24) | (outputStart << 16) | outputLength, or -1 when absent. Test the LocaleCondition before reading matching OutAt entries.

UnicodeData.wax:3534

LocaleLtUpperOutAtmethod

public static fn LocaleLtUpperOutAt(int32 i) : uint32

Reads one code point from the Lithuanian casing output table. Use the validated range from the matching Lookup; invalid indices panic.

UnicodeData.wax:3539

LocaleLtLowerOutAtmethod

public static fn LocaleLtLowerOutAt(int32 i) : uint32

Reads one code point from the Lithuanian casing output table. Use the validated range from the matching Lookup; invalid indices panic.

UnicodeData.wax:3544

LocaleTrUpperOutAtmethod

public static fn LocaleTrUpperOutAt(int32 i) : uint32

Reads one code point from the Turkish casing output table. Use the validated range from the matching Lookup; invalid indices panic.

UnicodeData.wax:3549

LocaleTrLowerOutAtmethod

public static fn LocaleTrLowerOutAt(int32 i) : uint32

Reads one code point from the Turkish casing output table. Use the validated range from the matching Lookup; invalid indices panic.

UnicodeData.wax:3554

LocaleAzUpperOutAtmethod

public static fn LocaleAzUpperOutAt(int32 i) : uint32

Reads one code point from the Azeri casing output table. Use the validated range from the matching Lookup; invalid indices panic.

UnicodeData.wax:3559

LocaleAzLowerOutAtmethod

public static fn LocaleAzLowerOutAt(int32 i) : uint32

Reads one code point from the Azeri casing output table. Use the validated range from the matching Lookup; invalid indices panic.

UnicodeData.wax:3564

GraphemeBreakPropOfmethod

public static fn GraphemeBreakPropOf(uint32 c) : GraphemeBreakProp

Returns the grapheme algorithm class for a code point, or Other above U+10FFFF.

UnicodeData.wax:3571

GbpDontBreakAtmethod

public static fn GbpDontBreakAt(int32 i) : uint32

Reads one packed grapheme-rule table entry by algorithm-state index. This is a segmentation implementation helper; use NextGraphemeBreakIn or string Graphemes for text. Invalid indices panic.

UnicodeData.wax:3584

GbpDontBreakGb11Atmethod

public static fn GbpDontBreakGb11At(int32 i) : uint32

Reads one packed grapheme-rule table entry by algorithm-state index. This is a segmentation implementation helper; use NextGraphemeBreakIn or string Graphemes for text. Invalid indices panic.

UnicodeData.wax:3590

GbpDontBreakGb12_13Atmethod

public static fn GbpDontBreakGb12_13At(int32 i) : uint32

Reads one packed grapheme-rule table entry by algorithm-state index. This is a segmentation implementation helper; use NextGraphemeBreakIn or string Graphemes for text. Invalid indices panic.

UnicodeData.wax:3596

GbpFlagUpdateGb11Atmethod

public static fn GbpFlagUpdateGb11At(int32 i) : uint32

Reads one packed grapheme-rule table entry by algorithm-state index. This is a segmentation implementation helper; use NextGraphemeBreakIn or string Graphemes for text. Invalid indices panic.

UnicodeData.wax:3602

GbpFlagUpdateGb12_13Atmethod

public static fn GbpFlagUpdateGb12_13At(int32 i) : uint32

Reads one packed grapheme-rule table entry by algorithm-state index. This is a segmentation implementation helper; use NextGraphemeBreakIn or string Graphemes for text. Invalid indices panic.

UnicodeData.wax:3608

HasBinaryPropertymethod

public static fn HasBinaryProperty(uint32 c, UnicodeBinaryProperty prop) : bool

Tests the code point against the selected supported Unicode property. Unknown property values return false.

UnicodeData.wax:3614

ScriptFromNamemethod

public static fn ScriptFromName(string t) : UnicodeScript?

Resolves a case-sensitive bundled Unicode name or alias. Unknown names return null.

UnicodeData.wax:3738

EmitTiledMatchesmethod

public static fn EmitTiledMatches(uint32[] table, uint32 wantVal, List<int32> result) : void

Appends flat half-open [lo, hi) pairs for matching low-byte values in a sorted (start << 8) | value table. Adjacent matches coalesce; the final segment ends at U+110000. Does not clear result.

UnicodeData.wax:3786

EmitTiledGroupMatchesmethod

public static fn EmitTiledGroupMatches(uint32[] table, int32 grp, List<int32> result) : void

Appends half-open pairs matching a category group in a packed category table. Uses CategoryGroupContains numbering, coalesces adjacent matches, and does not clear result.

UnicodeData.wax:3818

CategoryGroupContainsmethod

public static fn CategoryGroupContains(int32 cat, int32 grp) : bool

Tests a General_Category ordinal against group 0=L, 1=M, 2=N, 3=P, 4=S, 5=Z, or 6=C. Unknown groups return false.

UnicodeData.wax:3850

EmitInclusivePairsmethod

public static fn EmitInclusivePairs(uint32[] iv, List<int32> result) : void

Appends half-open pairs converted from a sorted inclusive-pair array, coalescing adjacent input intervals. Supply an even-length array of valid Unicode bounds. Does not clear result.

UnicodeData.wax:3869

CategoryIntervalsmethod

public static fn CategoryIntervals(int32 cat, List<int32> result) : void

Appends half-open code-point pairs for a General_Category ordinal, coalescing adjacent segments. Does not clear result.

UnicodeData.wax:3892

CategoryGroupIntervalsmethod

public static fn CategoryGroupIntervals(int32 grp, List<int32> result) : void

Appends half-open code-point pairs for group 0=L, 1=M, 2=N, 3=P, 4=S, 5=Z, or 6=C. Does not clear result.

UnicodeData.wax:3902

ScriptIntervalsmethod

public static fn ScriptIntervals(int32 sid, List<int32> result) : void

Appends half-open code-point pairs for a UnicodeScript ordinal. Does not clear result.

UnicodeData.wax:3910

BinaryPropertyIntervalsmethod

public static fn BinaryPropertyIntervals(UnicodeBinaryProperty prop, List<int32> result) : void

Appends half-open code-point pairs for the property across [0, U+110000). Does not clear result; an unsupported property appends nothing.

UnicodeData.wax:3919

BinaryPropFromNamemethod

public static fn BinaryPropFromName(string t) : UnicodeBinaryProperty?

Resolves a case-sensitive bundled Unicode name or alias. Unknown names return null.

UnicodeData.wax:3984

constructorconstructor

public constructor ()

Provided by the compiler.