helma.util
Class StringUtils

java.lang.Object
  extended by helma.util.StringUtils

public class StringUtils
extends java.lang.Object

Utility class for String manipulation.


Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String[] collect(java.util.Enumeration en)
          Collect items of a string enumeration into a String array.
static java.lang.String[] split(java.lang.String str)
          Split a string into an array of strings.
static java.lang.String[] split(java.lang.String str, java.lang.String delim)
          Split a string into an array of strings.
static java.lang.String[] splitLines(java.lang.String str)
          Split a string into an array of lines.
static char[] toCharArray(java.lang.String str)
          Get the character array for a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

split

public static java.lang.String[] split(java.lang.String str)
Split a string into an array of strings. Use comma and space as delimiters.


split

public static java.lang.String[] split(java.lang.String str,
                                       java.lang.String delim)
Split a string into an array of strings.


splitLines

public static java.lang.String[] splitLines(java.lang.String str)
Split a string into an array of lines.

Parameters:
str - the string to split
Returns:
an array of lines

toCharArray

public static char[] toCharArray(java.lang.String str)
Get the character array for a string. Useful for use from Rhino, where the Java String methods are not readily available without constructing a new String instance.

Parameters:
str - a string
Returns:
the char array

collect

public static java.lang.String[] collect(java.util.Enumeration en)
Collect items of a string enumeration into a String array.

Parameters:
en - an enumeration of strings
Returns:
the enumeration values as string array


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.