getUnicodeRange function

dynamic getUnicodeRange(
  1. dynamic unicode
)

Implementation

getUnicodeRange(unicode) {
    for (var i = 0; i < unicodeRanges.length; i += 1) {
        var range = unicodeRanges[i];
        if (unicode >= range["begin"] && unicode < range["end"]) {
            return i;
        }
    }

    return -1;
}