com.izforge.izpack.util
Class WordUtil
java.lang.Object
com.izforge.izpack.util.WordUtil
public class WordUtil
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WordUtil
public WordUtil()
main
public static void main(String[] args)
throws FileNotFoundException
- Throws:
FileNotFoundException
wordWrap
public static String wordWrap(String text,
int maxCharsPerLine)
wordWrap
public static String wordWrap(String text,
int maxCharsPerLine,
boolean wrapLineFull)
- Processes a given text and wraps it word boundary according to a defined line width.
- Parameters:
text - the raw text to be processedmaxCharsPerLine - the line widthwrapLineFull - whether wrapped lines should be explicitly divided by a newline character if the computed
line is exactly as long as the line width. This must be set false if the processed
text should be printed to a terminal which automatically wraps to the new line after the
last character has been printed at the last column.
- Returns:
- the processed text
wordWrap
public static List<String> wordWrap(InputStream in,
int maxCharsPerLine)
Copyright © 2017. All rights reserved.