diff --git a/projects/samskivert/src/java/com/samskivert/util/StringUtil.java b/projects/samskivert/src/java/com/samskivert/util/StringUtil.java index 922af657..084ea388 100644 --- a/projects/samskivert/src/java/com/samskivert/util/StringUtil.java +++ b/projects/samskivert/src/java/com/samskivert/util/StringUtil.java @@ -1,5 +1,5 @@ // -// $Id: StringUtil.java,v 1.59 2003/10/23 16:09:34 eric Exp $ +// $Id: StringUtil.java,v 1.60 2003/10/24 01:17:51 ray Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -138,10 +138,19 @@ public class StringUtil * Returns a string containing the requested number of spaces. */ public static String spaces (int count) + { + return fill(' ', count); + } + + /** + * Returns a string containing the specified character repeated the + * specified number of times. + */ + public static String fill (char c, int count) { StringBuffer buf = new StringBuffer(); for (int ii = 0; ii < count; ii++) { - buf.append(" "); + buf.append(c); } return buf.toString(); }