Normalization v0.1.0
HangulBase
pub const HangulBase: uint32 = 0xAC00;
The first Hangul syllable, LV and LVT composition's base.
DecomposeCanonical
pub func DecomposeCanonical(
text: char32[..],
into: var char32[..],
written: *var uint
) -> bool
Writes the canonical decomposition of text into into, marks in canonical order: NFD.
Reports the length through written, or false without a defined result when the room is short. The
decompositions are fully expanded in the tables, so nothing recurses.
written must be non-null and writable.
Parameters
| Name | Type | Description |
|---|---|---|
text | char32[..] | the scalar values to decompose |
into | var char32[..] | receives the decomposition |
written | *var uint | receives how many values were written |
Returns: false without writing when into is too short
DecomposeCompatibility
pub func DecomposeCompatibility(
text: char32[..],
into: var char32[..],
written: *var uint
) -> bool
Writes the compatibility decomposition of text into into, marks in canonical order: NFKD.
written must be non-null and writable.
Parameters
| Name | Type | Description |
|---|---|---|
text | char32[..] | the scalar values to decompose |
into | var char32[..] | receives the decomposition |
written | *var uint | receives how many values were written |
Returns: false without writing when into is too short
NormalizeCanonical
pub func NormalizeCanonical(
text: char32[..],
into: var char32[..],
written: *var uint
) -> bool
Writes the NFC of text into into: canonical decomposition, canonical order, then composition.
written must be non-null and writable.
Parameters
| Name | Type | Description |
|---|---|---|
text | char32[..] | the scalar values to normalize |
into | var char32[..] | receives the normalized form |
written | *var uint | receives how many values were written |
Returns: false without writing when into is too short
NormalizeCompatibility
pub func NormalizeCompatibility(
text: char32[..],
into: var char32[..],
written: *var uint
) -> bool
Writes the NFKC of text into into: compatibility decomposition, canonical order, then composition.
written must be non-null and writable.
Parameters
| Name | Type | Description |
|---|---|---|
text | char32[..] | the scalar values to normalize |
into | var char32[..] | receives the normalized form |
written | *var uint | receives how many values were written |
Returns: false without writing when into is too short