org.hsqldb.lib
Class StringUtil

java.lang.Object
  extended byorg.hsqldb.lib.StringUtil

public class StringUtil
extends Object

Provides a collection of convenience methods for processing and creating objects with String value components.

Since:
1.7.0
Version:
1.7.2
Author:
fredt@users, boucherb@users.sourceforge.net

Constructor Summary
StringUtil()
           
 
Method Summary
static void appendPair(StringBuffer b, String s1, String s2, String separator, String terminator)
           
static String arrayToString(Object array)
           
static String getList(int[] s, String separator, String quote)
          Builds a CSV list from the specified int[], separator String and quote String.
static String getList(String[][] s, String separator, String quote)
          Builds a CSV list from the specified String[][], separator string and quote string.
static String getList(String[] s, String separator, String quote)
          Builds a CSV list from the specified String[], separator string and quote string.
static boolean isEmpty(String s)
          Checks if text is empty (characters <= space)
static int rTrimSize(String s)
           
static int skipSpaces(String s, int start)
          Skips any spaces at or after start and returns the index of first non-space character;
static String toLowerSubset(String source, char substitute)
          Returns a string with non alphanumeric chars converted to the substitute character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

toLowerSubset

public static String toLowerSubset(String source,
                                   char substitute)
Returns a string with non alphanumeric chars converted to the substitute character. A digit first character is also converted. By sqlbob@users

Parameters:
source - string to convert
substitute - character to use
Returns:
converted string

arrayToString

public static String arrayToString(Object array)

getList

public static String getList(String[] s,
                             String separator,
                             String quote)
Builds a CSV list from the specified String[], separator string and quote string.


getList

public static String getList(int[] s,
                             String separator,
                             String quote)
Builds a CSV list from the specified int[], separator String and quote String.


getList

public static String getList(String[][] s,
                             String separator,
                             String quote)
Builds a CSV list from the specified String[][], separator string and quote string.


appendPair

public static void appendPair(StringBuffer b,
                              String s1,
                              String s2,
                              String separator,
                              String terminator)

isEmpty

public static boolean isEmpty(String s)
Checks if text is empty (characters <= space)

Parameters:
s - java.lang.String
Returns:
boolean true if text is null or empty, false otherwise

rTrimSize

public static int rTrimSize(String s)

skipSpaces

public static int skipSpaces(String s,
                             int start)
Skips any spaces at or after start and returns the index of first non-space character;



Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.