StringUtil Class
- public class StringUtil
extends Object
This class provides som static utilities to deal with Strings. At this time, it
only contains code to wrap text in HTML.
-
Hierarchy
-
Object
StringUtil
public static String |
-
wrapText (String s, int desiredLength, int maxLength)
- Wraps the given text in HTML, attempting to be between the desired
and maximum length on each line.
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringUtil
public StringUtil()
wrapText(String, int, int) Method
public static String
wrapText(String
s,
int desiredLength,
int maxLength)
Wraps the given text in HTML, attempting to be between the desired
and maximum length on each line. If there aren't any breaks between
those two points, it will use the first break before the desired length.
If there are no breaks, it will wrap the line at the maximum length.
Also escapes HTML values.