Hi Tommy,

It's highly unlikely that such a method exists. Try the following, i
think it's simpler:

public static String repeatChar(char ch, int length) {
        char[] arr = new char[length];
        Arrays.fill(arr, ch);
        return new String(arr);
}

Or if you prefer you can try this library:

http://jscience.org/experimental/javadoc/org/jscience/architecture/traffic/util/StringUtils.html

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to