getFoldedValue
int getFoldedValue(int start,
int offset)
Build-time trie callback function, used with serialize().
This function calculates a lead surrogate's value including a
folding offset from the 1024 supplementary code points
[start..start+1024[ .
It is U+10000 <= start <= U+10fc00 and (start&0x3ff)==0.
The folding offset is provided by the caller.
It is offset=UTRIE_BMP_INDEX_LENGTH+n*UTRIE_SURROGATE_BLOCK_COUNT
with n=0..1023.
Instead of the offset itself, n can be stored in 10 bits - or fewer
if it can be assumed that few lead surrogates have associated data.
The returned value must be
- not zero if and only if there is relevant data for the
corresponding 1024 supplementary code points
- such that UTrie.getFoldingOffset(UNewTrieGetFoldedValue(...,
offset))==offset
- Returns:
- a folded value, or 0 if there is no relevant data for the
lead surrogate.