get all the chars not in cache
@param key cache key
@param characterSet (Array|Set)
@returns {Array} chars not in cache
965350
function getNewChars(key, characterSet) {
  const cachedFontAtlas = cache.get(key);
  if (!cachedFontAtlas) {
    return characterSet;
  }

  const newChars = [];
  const cachedMapping = cachedFontAtlas.mapping;
  let cachedCharSet = Object.keys(cachedMapping);
  cachedCharSet = new Set(cachedCharSet);

  let charSet = characterSet;
  if (charSet instanceof Array) {
    charSet = new Set(charSet);
  }

  charSet.forEach(char => {
    if (!cachedCharSet.has(char)) {
      newChars.push(char);
    }
  });

  return newChars;
}
1292451
@SuppressWarnings("unchecked")
    public static List<Character> getAt(char[] array, Range range) {
        return primitiveArrayGet(array, range);
    }
1122649
public T get(String key) {
        SoftReference<T> ref = cacheMap.get(key);
        if (ref != null) {
            if (ref.get() == null) {
                logger.debug("Cached item was cleared: " + key);
            }
            return ref.get(); //maybe still be null
        }

        return null;
    }
372924
public T charset(String charset) {
		if(StrUtil.isNotBlank(charset)){
			this.charset = Charset.forName(charset);
		}
		return (T) this;
	}
515768
public static List<Character> filterLetters(List<Character> characters) {
        return characters.stream().filter(Character::isLetter).collect(toList());
    }
1309590
private void convert(int set[], UnicodeSet uset)
    {
        uset.clear();
        if (!initNameSetsLengths()) {
            return;
        }

        // build a char string with all chars that are used in character names
        for (char c = 255; c > 0; c --) {
            if (contains(set, c)) {
                uset.add(c);
            }
        }
    }
445370
public boolean hasTemplate(String key)
	{
		Program program = (Program) this.programCache.get(key);
		return program != null;
	}
145912
function maybeIdentifier(key) {
        var result = false,
            i;

        for (i = 0; i < key.length; i++) {
            result = Acorn.isIdentifierChar(key.charCodeAt(i));
            if (!result) {
                break;
            }
        }

        return result;
    }
1122506
public static Characters allBut(String chars) {
        return StringUtils.isEmpty(chars) ? Characters.ALL : new Characters(true, chars.toCharArray());
    }
139314
public boolean containsRet(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetRet().getMap().containsKey(key);
  }
114597
public Postcard withChar(@Nullable String key, char value) {
        mBundle.putChar(key, value);
        return this;
    }
355403
public int delete(String key)
    {
        if (key == null)
        {
            return -1;
        }
        int curState = 1;
        int[] ids = this.charMap.toIdList(key);

        int[] path = new int[ids.length + 1];
        int i = 0;
        for (; i < ids.length; i++)
        {
            int c = ids[i];
            if ((getBase(curState) + c >= getBaseArraySize())
                || (getCheck(getBase(curState) + c) != curState))
            {
                break;
            }
            curState = getBase(curState) + c;
            path[i] = curState;
        }
        int ret = -1;
        if (i == ids.length)
        {
            if (getCheck(getBase(curState) + UNUSED_CHAR_VALUE) == curState)
            {
                --this.size;
                ret = getLeafValue(getBase(getBase(curState) + UNUSED_CHAR_VALUE));
                path[(path.length - 1)] = (getBase(curState) + UNUSED_CHAR_VALUE);
                for (int j = path.length - 1; j >= 0; --j)
                {
                    boolean isLeaf = true;
                    int state = path[j];
                    for (int k = 0; k < this.charMap.getCharsetSize(); k++)
                    {
                        if (isLeafValue(getBase(state)))
                        {
                            break;
                        }
                        if ((getBase(state) + k < getBaseArraySize())
                            && (getCheck(getBase(state) + k) == state))
                        {
                            isLeaf = false;
                            break;
                        }
                    }
                    if (!isLeaf)
                    {
                        break;
                    }
                    addFreeLink(state);
                }
            }
        }
        return ret;
    }
1072113
public Set<Character> tokens() {
    return root().getChildrenMap().keySet().stream()
      .filter(c -> c != END_OF_STRING && c != FALLBACK && c != ESCAPE)
      .collect(Collectors.toSet());
  }
937359
public List<String> readStringSubKeys(HKey hk, String key, String charsetName) throws RegistryException {
		try {
			return ReflectedMethods.readStringSubKeys(hk.root(), hk.hex(), key, charsetName);
		} catch (Exception e) {
			throw new RegistryException("Cannot read sub keys from key " + key, e);
		}
	}
1071822
public Set<String> getPropertyAsSet(String key) {
		Set<String> propertiesSet = new HashSet<>();
		StringTokenizer tk = new StringTokenizer(props.getProperty(prefix + key, ""), ",");
		while (tk.hasMoreTokens())
			propertiesSet.add(tk.nextToken().trim());
		return propertiesSet;
	}
440557
public int get(char []key, int length)
  {
    if (key == null)
      return NULL;

    int hash = hash(key, length) & _mask;

    while (true) {
      char []mapKey = _keys[hash];

      if (mapKey == null)
        return NULL;
      else if (equals(mapKey, key, length))
        return _values[hash];

      hash = (hash + 1) & _mask;
    }
  }
236057
@Override
  public String header(String key)
  {
    CharSegment buf = getHeaderBuffer(key);
    
    if (buf != null)
      return buf.toString();
    else
      return null;
  }