kylm.util
Class KylmTextUtils

java.lang.Object
  extended by kylm.util.KylmTextUtils

public class KylmTextUtils
extends java.lang.Object

A collection of functions that have to do with handling text

Author:
neubig

Field Summary
static java.util.regex.Pattern whiteSpace
           
static java.lang.String whiteSpaceString
           
 
Constructor Summary
KylmTextUtils()
           
 
Method Summary
static java.lang.String join(java.lang.String glue, double[] arr)
          join an array together with string glue between the words
static java.lang.String join(java.lang.String glue, int[] arr)
          join an array together with string glue between the words
static java.lang.String join(java.lang.String glue, java.lang.Object[] arr)
          join an array together with string glue between the words
static java.lang.String[] splitChars(java.lang.String string)
          Splits the input string into an array of strings, each containing one character
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

whiteSpace

public static final java.util.regex.Pattern whiteSpace

whiteSpaceString

public static java.lang.String whiteSpaceString
Constructor Detail

KylmTextUtils

public KylmTextUtils()
Method Detail

splitChars

public static java.lang.String[] splitChars(java.lang.String string)
Splits the input string into an array of strings, each containing one character

Parameters:
string - The string to be split
Returns:
The output array of one-character strings

join

public static java.lang.String join(java.lang.String glue,
                                    double[] arr)
join an array together with string glue between the words

Parameters:
glue - The string to be added between the words
arr - The array of doubles to be printed
Returns:
A string with the array joined together

join

public static java.lang.String join(java.lang.String glue,
                                    java.lang.Object[] arr)
join an array together with string glue between the words

Parameters:
glue - The string to be added between the words
arr - The array of objects to be printed
Returns:
A string with the array joined together

join

public static java.lang.String join(java.lang.String glue,
                                    int[] arr)
join an array together with string glue between the words

Parameters:
glue - The string to be added between the words
arr - The array of objects to be printed
Returns:
A string with the array joined together