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.


Constructor Index

 o StringChop(String, int)
Creates a new StringChop.

Method Index

 o chopString(String, int)
Chops the string inside this StringChop.
 o getChops()
Returns the chopped string (as an array of Strings).
 o getsize()
Returns the size (number of lines) of this StringChop.
 o printout(String[])
Prints out a String[].

Constructors

 o StringChop
 public StringChop(String in,
                   int clength)
Creates a new StringChop.

Parameters:
in - The input String.
clength - The length of each piece.

Methods

 o getChops
 public String[] getChops()
Returns the chopped string (as an array of Strings).

Returns:
A String[] with the chopped String in it.
 o 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.
 o printout
 public void printout(String stuff[])
Prints out a String[].

Parameters:
stuff - The String[] to be printed.
 o 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