1 package org.codehaus.groovy.tools; 2 3 6 7 public abstract class Utilities 8 { 9 12 13 public static String repeatString( String pattern, int repeats ) 14 { 15 StringBuffer buffer = new StringBuffer ( pattern.length() * repeats ); 16 for( int i = 0; i < repeats; i++ ) 17 { 18 buffer.append( pattern ); 19 } 20 21 return new String ( buffer ); 22 } 23 24 25 28 29 public static String eol() 30 { 31 return eol; 32 } 33 34 private static String eol = System.getProperty( "line.separator", "\n" ); 35 36 } 37 | Popular Tags |