public static void repeat ( StringBuilder sb , String str , int count ) { for ( int i = 0 ; i < count ; i ++ ) { sb . append ( str ) ; } }
Repeats string of characters a defined number of times and appends result to StringBuilder .