Convert a number to their ascii code/s.
@param index
@param totalChar
@param offset
@returns {Array}
@private
771213
function _numberToKey(index, totalChar, offset) {
    var aArr = [],
      currentChar = index;
    totalChar = totalChar || 26;
    offset = offset || 65;
    while (currentChar >= totalChar) {
      aArr.push((currentChar % totalChar) + offset);
      currentChar = Math.floor(currentChar / totalChar - 1);
    }
    aArr.push(currentChar + offset);
    return aArr.reverse();
  }
1314958
public static <T extends CharSequence> T validIndex(final T chars, final int index, final String message) {
        return INSTANCE.validIndex(chars, index, message);
    }
793382
function (str, length, offset) {

                str = str || '';

                if (undefined === offset) {
                    offset = this.offset;
                }

                length  = length || str.replace(/[^\x00-\xff]/g, '11').length;

                if (length < 0 || offset + length > this.length) {
                    error.raise(10002, this.length, offset + length);
                }

                this.seek(offset);

                for (var i = 0, l = str.length, charCode; i < l; ++i) {
                    charCode = str.charCodeAt(i) || 0;
                    if (charCode > 127) {
                        // unicode编码可能会超出2字节,
                        // 写入与编码有关系，此处不做处理
                        this.writeUint16(charCode);
                    }
                    else {
                        this.writeUint8(charCode);
                    }
                }

                this.offset = offset + length;

                return this;
            }
1160391
function (ascii) {
			var asciiArray = ascii.split(",");
			var parsedString = "";

			jQuery.each(asciiArray, function (index, asciiChar) {
				parsedString += String.fromCharCode(asciiChar);
			});

			return parsedString;

		}
300640
function (ints) {
    var ret = '0x'
    for (var i = 0; i < ints.length; i++) {
      var h = ints[i]
      if (h) {
        ret += (h <= 0xf ? '0' : '') + h.toString(16)
      } else {
        ret += '00'
      }
    }
    return ret
  }
1107743
function (str, token) {
            var total = 0, i;
            while ((i = str.indexOf(token, i) + 1)) {
                total++;
            }
            return total;
        }
1072314
@Override
    public V get(String s, int offset, int len) {
        int t = 0;
        for (int i = 0; i < len; i++) {
            char c = s.charAt(offset + i);
            int index = __lookup[c & 0x7f];
            if (index >= 0) {
                int idx = t * ROW_SIZE + index;
                t = _rowIndex[idx];
                if (t == 0)
                    return null;
            } else {
                char[] big = _bigIndex == null ? null : _bigIndex[t];
                if (big == null)
                    return null;
                t = big[c];
                if (t == 0)
                    return null;
            }
        }
        return _value[t];
    }
734752
function(str, index) {
    // replace {{ xxx }}
    var obj = this
    str = str.replace(interpolateReg, function(match, interpolate) {
      try {
        /*jslint evil: true */
        var funcNames = ['','index'].concat(fakerFuncNames).concat(['return ' + interpolate + ';']),
        func = new (Function.prototype.bind.apply(Function, funcNames)),
        funcs = [function(){return index}].concat(fakerFuncs);

        return func.apply(obj, funcs);
        
      } catch(e)  {
        return e.message;
      }
    });

    // if result is true or false, parse it to boolean
    if(/^(true|false)$/.test(str)) {
      str = str === 'true';
    }

    // if result is digit, parse it to float
    if(/^[-+]?\d*\.?\d+$/.test(str)) {
      str = parseFloat(str);
    }

    return str;
  }
880984
public String convertIndexToDisStr(int index)
    {
        String[][] rgstring = this.getPopupMap();
        if (index >= rgstring.length)
            return Constants.BLANK;
        return rgstring[index][1];
    }
376050
public String getUtf8AsString(int index)
  {
    Utf8Constant utf8 = (Utf8Constant) _entries.get(index);

    if (utf8 == null)
      return null;
    else
      return utf8.getValue();
  }
549200
public String convertIndexToDisStr(int index)
    {
        int iErrorCode = this.moveToIndex(index);
        if (iErrorCode == DBConstants.NORMAL_RETURN)
        {
            if (displayFieldName != null)
                return m_record.getField(displayFieldName).getString();
            else
                return m_record.getField(m_iFieldSeq).getString();
        }
        else
            return Constants.BLANK;
    }
491665
public static int parseInt(char[] s, int beginIndex, int endIndex)
            throws NumberFormatException {
        s = Objects.requireNonNull(s);

        if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length) {
            throw new IndexOutOfBoundsException();
        }
        if (radix < Character.MIN_RADIX) {
            throw new NumberFormatException("radix " + radix +
                    " less than Character.MIN_RADIX");
        }
        if (radix > Character.MAX_RADIX) {
            throw new NumberFormatException("radix " + radix +
                    " greater than Character.MAX_RADIX");
        }

        boolean negative = false;
        int i = beginIndex;
        int limit = -Integer.MAX_VALUE;

        if (i < endIndex) {
            char firstChar = s[i];
            if (firstChar < '0') { // Possible leading "+" or "-"
                if (firstChar == '-') {
                    negative = true;
                    limit = Integer.MIN_VALUE;
                } else if (firstChar != '+') {
                    throw numberFormatExceptionforCharSequence(s, beginIndex,
                            endIndex, i);
                }
                i++;
                if (i == endIndex) { // Cannot have lone "+" or "-"
                    throw numberFormatExceptionforCharSequence(s, beginIndex,
                            endIndex, i);
                }
            }
            int multmin = limit / radix;
            int result = 0;
            while (i < endIndex) {
                // Accumulating negatively avoids surprises near MAX_VALUE
                int digit = digit(s[i]);
                if (digit < 0 || result < multmin) {
                    throw numberFormatExceptionforCharSequence(s, beginIndex,
                            endIndex, i);
                }
                result *= radix;
                if (result < limit + digit) {
                    throw numberFormatExceptionforCharSequence(s, beginIndex,
                            endIndex, i);
                }
                i++;
                result -= digit;
            }
            return negative ? result : -result;
        } else {
            return 0;
        }
    }
1205577
function toAlphabet(num, alphabet) {
				var base = alphabet.length;
				var digits = [];	// these will be in reverse order since arrays are stacks

				// execute at least once, even if num is 0, since we should return the '0':
				do {
					digits.push(num % base);	// TODO handle negatives properly?
					num = Math.floor(num / base);
				} while (num > 0);

				var chars = [];
				while (digits.length) {
					chars.push(alphabet[digits.pop()]);
				}
				return chars.join('');
			}
840042
public final int offsetIn(String s) {
    for (int offset = 0; offset < s.length(); ) {
      final int codePoint = s.codePointAt(offset);
      if (matches(codePoint)) {
        return offset;
      }
      offset += Character.charCount(codePoint);
    }
    return NO_MATCH_OFFSET;
  }
910066
function(offset) {
        var index = this._indexArray,
            l = this.index_pointer;
        index[0 + l] = 0 + offset;
        index[1 + l] = 1 + offset;
        index[2 + l] = 2 + offset;
        index[3 + l] = 1 + offset;
        index[4 + l] = 2 + offset;
        index[5 + l] = 3 + offset;
        this.index_pointer += 6;
    }
618178
public static int CJKIndexOf(String str, int offset)
    {
        for ( int j = offset; j < str.length(); j++ ) {
            if ( isCJKChar(str.charAt(j)) ) {
                return j;
            }
        }
        
        return -1;
    }
1339115
function unparse(buf, offset) {
  var i = offset || 0;
  return '03020100-0504-0706-0809-101112131415'.replace(/\d{2}/g, function (num) {
    var j = parseInt(num, 10);
    return _byteToHex[buf[i+j]];
  })
}