Package org.apache.jorphan.util
Class StringWrap
java.lang.Object
org.apache.jorphan.util.StringWrap
Wraps text in such a way so the lines do not exceed given maximum length.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
Wraps giveninput
text accoding to
-
Constructor Details
-
StringWrap
public StringWrap(int minWrap, int maxWrap) Creates string wrapper instance.- Parameters:
minWrap
- minimal word length for the wrapmaxWrap
- maximum word length for the wrap
-
-
Method Details
-
getMinWrap
public int getMinWrap() -
getMaxWrap
public int getMaxWrap() -
wrap
Wraps giveninput
text accoding to- Parameters:
input
- input textdelimiter
- delimiter when inserting soft wraps- Returns:
- modified text with added soft wraps, or input if wraps are not needed
-