コード例 #1
0
 /**
  * The first translator to consume codepoints from the input is the 'winner'. Execution stops with
  * the number of consumed codepoints being returned. {@inheritDoc}
  */
 @Override
 public int translate(CharSequence input, int index, Writer out) throws IOException {
   for (CharSequenceTranslator translator : translators) {
     int consumed = translator.translate(input, index, out);
     if (consumed != 0) {
       return consumed;
     }
   }
   return 0;
 }
コード例 #2
0
ファイル: Strings.java プロジェクト: zolyfarkas/spf4j
 public static String unescape(final String what) {
   return UNESCAPE_JAVA.translate(what);
 }