MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxGetCombinationOrder

Function fxGetCombinationOrder

xs/sources/xsString.c:3391–3412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3389}
3390
3391txInteger fxGetCombinationOrder(txInteger character)
3392{
3393 txInteger count;
3394 txCombination *index, *it;
3395 txCombination combination;
3396 if (character < 0x10000) {
3397 count = mxCombinationCount0;
3398 index = (txCombination*)gxCombinationIndex0;
3399 combination.code = (txU2)character;
3400 }
3401 else {
3402 count = mxCombinationCount1;
3403 index = (txCombination*)gxCombinationIndex1;
3404 combination.code = (txU2)(character & 0xFFFF);
3405 }
3406 combination.count = 1;
3407 combination.order = 0;
3408 it = (txCombination*)c_bsearch(&combination, index, count, sizeof(txCombination), fxCompareCombination);
3409 if (it)
3410 return it->order;
3411 return 0;
3412}
3413
3414txInteger fxGetCompositionPairs(txInteger character, txU2** pairs, txInteger* pairCount)
3415{

Callers 2

fxNormalizeCompositionFunction · 0.85
fxNormalizeDecompositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected