org.aitools.programd.util
Class StringKit

java.lang.Object
  extended by org.aitools.programd.util.StringKit

public class StringKit
extends Object

Contains various utilities.

Author:
Richard Wallace, Jon Baer, Thomas Ringate, Pedro Colla, Noel Bush

Constructor Summary
StringKit()
           
 
Method Summary
static String renderAsLines(String[] strings)
          Turns an array of strings into a single string with line separators between each of the original strings.
static String tab(int level)
          Returns a tab of the specified length.
static ArrayList<String> wordSplit(String input)
          Splits an input into words, breaking at spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringKit

public StringKit()
Method Detail

tab

public static String tab(int level)
Returns a tab of the specified length.

Parameters:
level - the level of the tab
Returns:
the requested tab

wordSplit

public static ArrayList<String> wordSplit(String input)
Splits an input into words, breaking at spaces. This method is obviously limited in that it is not aware of other word boundaries.

Parameters:
input - the input to split
Returns:
the input split into sentences

renderAsLines

public static String renderAsLines(String[] strings)
Turns an array of strings into a single string with line separators between each of the original strings.

Parameters:
strings - the strings to render
Returns:
the rendered strings