code: private void emit(int pos, int end, String arg) {
      while (pos < end) {
        char ch = format.charAt(pos);
        if (ch == '#') {
          buf.append(arg == null ? ch : arg);
        } else {
          buf.append(ch);
        }
        pos++;
      }
    }
docs: Append characters from 'raw' in the range [pos, end) to the output buffer.