Android examples for java.lang:String Algorithm
repeat string for certain times using StringBuffer
import android.text.Html; import android.text.Spanned; public class Main{ public static String repeat(String string, int repeat) { StringBuffer str = new StringBuffer(); for (int i = 0; i < repeat; i++) str.append(string);//from w w w. ja v a2 s . com return str.toString(); } }