org.nocrala.tools.utils.Filler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of text-table-formatter Show documentation
Show all versions of text-table-formatter Show documentation
Java Text Table Formatter is a Java library that renders tables made of characters.
The user add cells and can add format characteristics like predefined/custom table styles, text alignment, abbreviation, column width, border types, colspan, etc.
The newest version!
package org.nocrala.tools.utils;
public class Filler {
public static String getFiller(final int width) {
return getFiller(" ", width);
}
public static String getFiller(final String txt, final int width) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < width; i++) {
sb.append(txt);
}
return sb.toString();
}
}