if (! value.isNull()) result.append(value); else result.append(ch);
if (p >= 0 && (p < bestHead || p == bestHead && bestLength < from[i].length())) { bestHead = p; bestI = i; bestLength = from[i].length(); } }  if (head != bestHead) result.append(string.substring(head, bestHead));  if (bestI >= 0) result.append(to[bestI]);  head = bestHead + bestLength;
  private static String strtr_array(String string, ArrayValue map)  {    StringBuilder result = new StringBuilder();    int len = string.length();    for (int i = 0; i < len; i++) {      char ch = string.charAt(i);      Value value = map.get(StringValue.create(ch));      if (! value.isNull())	result.append(value);      else	result.append(ch);    }    return result.toString();  }