X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Futil%2FTextUtil.java;h=0b86876de9055e3047b5ea3649b9c19e50325a31;hb=cb6cee5e14451dd9b852723a30a5fbdee404d959;hp=0189545e0dd7f00810515801b1f5fb6f3d9e3cad;hpb=0be17fea9df8667c018922d9eca1166254dce470;p=debian%2Fopenrocket diff --git a/core/src/net/sf/openrocket/util/TextUtil.java b/core/src/net/sf/openrocket/util/TextUtil.java index 0189545e..0b86876d 100644 --- a/core/src/net/sf/openrocket/util/TextUtil.java +++ b/core/src/net/sf/openrocket/util/TextUtil.java @@ -184,4 +184,17 @@ public class TextUtil { s = s.replace(">", ">"); return s; } + + /* + * Returns a word-wrapped version of given input string using HTML syntax, wrapped to len characters. + */ + public static String wrap(String in,int len) { + in=in.trim(); + if(in.length()"+in.substring(0,place).trim()+"
"+wrap(in.substring(place),len); + } + }