code: public static void appendToRule(StringBuffer rule,
              String text,
              boolean isLiteral,
              boolean escapeUnprintable,
              StringBuffer quoteBuf) {
          for (int i=0; i<text.length(); ++i) {
              // Okay to process in 16-bit code units here
              appendToRule(rule, text.charAt(i), isLiteral, escapeUnprintable, quoteBuf);
          }
      }
docs: Append the given string to the rule.  Calls the single-character
  version of appendToRule for each character.