code: public StringBuilder formatAndReplace(
              StringBuilder result, int[] offsets, CharSequence... values) {
          return SimpleFormatterImpl.formatAndReplace(compiledPattern, result, offsets, values);
      }
docs: Formats the given values, replacing the contents of the result builder.
  May optimize by actually appending to the result if it is the same object
  as the value corresponding to the initial argument in the pattern.
  
  @param result Gets its contents replaced by the formatted pattern and values.
  @param offsets offsets[i] receives the offset of where
  values[i] replaced pattern argument {i}.
  Can be null, or can be shorter or longer than values.
  If there is no {i} in the pattern, then offsets[i] is set to -1.
  @param values The argument values.
  An argument value may be the same object as result.
  values.length must be at least getArgumentLimit().
  @return result
  @hide draft / provisional / internal are hidden on Android