protected static int decodeEscape()

in src/prettify/parser/CombinePrefixPattern.java [85:101]


  protected static int decodeEscape(String charsetPart) {
    Integer cc0 = charsetPart.codePointAt(0);
    if (cc0 != 92 /* \\ */) {
      return cc0;
    }
    char c1 = charsetPart.charAt(1);
    cc0 = escapeCharToCodeUnit.get(c1);
    if (cc0 != null) {
      return cc0;
    } else if ('0' <= c1 && c1 <= '7') {
      return Integer.parseInt(charsetPart.substring(1), 8);
    } else if (c1 == 'u' || c1 == 'x') {
      return Integer.parseInt(charsetPart.substring(2), 16);
    } else {
      return charsetPart.codePointAt(1);
    }
  }