code: public static String sprintf( String s, int[] params ) {
          if ((s == null) || (params == null)) {
              return s;
          }
          StringBuffer result = new StringBuffer("");
          String[] ss = split(s);
          int p = 0;
          for( int i = 0; i < ss.length; i++ ) {
              char c = ss[i].charAt(0);
              String t = ss[i].substring(1);
              if (c == '+') {
                  result.append(t);
              } else {
                  int param = params[p];
                  result.append(new Format(t).form(param));
                  p++;
              }
          }
          return result.toString();
      }
docs: ---------------------------------------------------------------- primitives array sprintf