All Packages Class Hierarchy This Package Previous Next Index
Class w3c.tools.util.StringChop
java.lang.Object
|
+----w3c.tools.util.StringChop
- public class StringChop
- extends Object
StringChop chops up long strings into smaller string of approximately the
same length. StringChop acts like word-wrap, it will not chop within a
word.
-
StringChop(String, int)
- Creates a new StringChop.
-
chopString(String, int)
- Chops the string inside this StringChop.
-
getChops()
- Returns the chopped string (as an array of Strings).
-
getsize()
- Returns the size (number of lines) of this StringChop.
-
printout(String[])
- Prints out a String[].
StringChop
public StringChop(String in,
int clength)
- Creates a new StringChop.
- Parameters:
- in - The input String.
- clength - The length of each piece.
getChops
public String[] getChops()
- Returns the chopped string (as an array of Strings).
- Returns:
- A String[] with the chopped String in it.
chopString
public String[] chopString(String s,
int choplength)
- Chops the string inside this StringChop.
- Parameters:
- s - The String to be chopped.
- choplength - The length of each piece.
- Returns:
- A String[] with the chopped String in it.
printout
public void printout(String stuff[])
- Prints out a String[].
- Parameters:
- stuff - The String[] to be printed.
getsize
public int getsize()
- Returns the size (number of lines) of this StringChop.
- Returns:
- An integer.
All Packages Class Hierarchy This Package Previous Next Index