/** * Utility method to repeat string. * * @param string String to repeat. * @param times Number of times. * @return Repeat string. */ public static String repeat(String string, int times) { if (times <= 0) { return ""; } else if (times % 2 == 0) { return repeat(string+string, times/2); } else { return string + repeat(string+string, times/2); } } }
/** * Utility method to repeat string. * * @param string String to repeat. * @param times Number of times. * @return Repeat string. */ public static String repeat(String string, int times) { if (times <= 0) { return ""; } else if (times % 2 == 0) { return repeat(string+string, times/2); } else { return string + repeat(string+string, times/2); } } }
@Override public String position(String text, int colWidth) { return repeat(" ", colWidth - length(text)) + text; } };
@Override public String position(String text, int colWidth) { return repeat(" ", colWidth - length(text)) + text; } };
@Override public String position(String text, int colWidth) { return text + repeat(" ", colWidth - length(text)); } },
@Override public String position(String text, int colWidth) { return text + repeat(" ", colWidth - length(text)); } },
st2.append(strings[line]); } else { st2.append(StringUtil.repeat(" ", cols.get(col).getSize()));
st2.append(strings[line]); } else { st2.append(StringUtil.repeat(" ", cols.get(col).getSize()));