public static String repeat(String s, int count) {
      if (s == null) {
         return null;
      }
      StringBuilder builder = new StringBuilder();
      for (int i = 0; i < count; i++) {
         builder.append(s);
      }
      return builder.toString();
   }
public static String repeat ( String s , int count ) { if ( s == null ) { return null ; } StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < count ; i ++ ) { builder . append ( s ) ; } return builder . toString ( ) ; }
Repeat string.

@param s     the s
@param count the count
@return the string