X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Fresources%2FStringUtils.java;h=2009dce628ef48864d48cf51c31bab5e6eae9813;hb=3634193b7a8927e68a3ae3d38fff4f6bd36c4ee5;hp=bfe0d3da44782e82db58416549c1b11a3f74a33e;hpb=7da41ecd30228908bf2afcd07ff7943ab59d4c01;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/resources/StringUtils.java b/src/be/nikiroo/jvcard/resources/StringUtils.java index bfe0d3d..2009dce 100644 --- a/src/be/nikiroo/jvcard/resources/StringUtils.java +++ b/src/be/nikiroo/jvcard/resources/StringUtils.java @@ -22,8 +22,7 @@ public class StringUtils { * @param text * the {@link String} to fix * @param width - * the size of the resulting {@link String} if the text fits or - * if cut is TRUE + * the size of the resulting {@link String} or -1 for a noop * * @return the resulting {@link String} of size size */ @@ -39,7 +38,7 @@ public class StringUtils { * the {@link String} to fix * @param width * the size of the resulting {@link String} if the text fits or - * if cut is TRUE + * if cut is TRUE or -1 for a noop * @param cut * cut the {@link String} shorter if needed * @param align @@ -50,7 +49,7 @@ public class StringUtils { */ static public String padString(String text, int width, boolean cut, Alignment align) { - + if (width >= 0) { if (text == null) text = "";