code: public static String format(final String value, String... params) {
          validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
          Pattern p = Pattern.compile("\\{(\\w+)}");
          Matcher m = p.matcher(value);
          String result = value;
          while (m.find()) {
              int paramNumber = Integer.parseInt(m.group(1));
              if (params == null || paramNumber >= params.length) {
                  throw new IllegalArgumentException("params does not have value for " + m.group());
              }
              result = result.replace(m.group(), params[paramNumber]);
          }
          return result;
      }
docs: Formats a string using parameters
  
  @param value  The value to be formatted
  @param params Parameters to be described in the string
  @return The formatted string