addStringToPool function

dynamic addStringToPool(
  1. dynamic s,
  2. dynamic pool
)

Implementation

addStringToPool(s, pool) {
    var offset = findSubArray(s, pool);
    if (offset < 0) {
        offset = pool.length;
        var i = 0;
        var len = s.length;
        for (; i < len; ++i) {
            pool.add(s[i]);
        }

    }

    return offset;
}