code: private static int extractConverter(
      char lastChar, final String pattern, int i, final StringBuffer convBuf,
      final StringBuffer currentLiteral) {
      convBuf.setLength(0);
  
      // When this method is called, lastChar points to the first character of the
      // conversion word. For example:
      // For "%hello"     lastChar = 'h'
      // For "%-5hello"   lastChar = 'h'
      //System.out.println("lastchar is "+lastChar);
      if (!Character.isUnicodeIdentifierStart(lastChar)) {
        return i;
      }
  
      convBuf.append(lastChar);
  
      while (
        (i < pattern.length())
          && Character.isUnicodeIdentifierPart(pattern.charAt(i))) {
        convBuf.append(pattern.charAt(i));
        currentLiteral.append(pattern.charAt(i));
  
        //System.out.println("conv buffer is now ["+convBuf+"].");
        i++;
      }
  
      return i;
    }
docs: Extract the converter identifier found at position i.
  
  After this function returns, the variable i will point to the
  first char after the end of the converter identifier.
  
  If i points to a char which is not a character acceptable at the
  start of a unicode identifier, the value null is returned.
  
  @param lastChar last processed character.
  @param pattern format string.
  @param i current index into pattern format.
  @param convBuf buffer to receive conversion specifier.
  @param currentLiteral literal to be output in case format specifier in unrecognized.
  @return position in pattern after converter.