com.vladium.util
Class Strings

java.lang.Object
  extended by com.vladium.util.Strings

public abstract class Strings
extends java.lang.Object

Author:
Vlad Roubtsov, (C) 2003

Field Summary
private static boolean USE_GET_CHARS
           
static java.lang.String WHITE_SPACE
           
 
Constructor Summary
private Strings()
           
 
Method Summary
static java.lang.String HTMLEscape(java.lang.String s)
           
static void HTMLEscape(java.lang.String s, java.lang.StringBuffer append)
          HTML attribute values can be quoted using either double or single quotes.
static void HTMLEscapeNB(java.lang.String s, java.lang.StringBuffer append)
          Same as HTMLEscape(String, StringBuffer) but also replaces spaces with " "'s, which is handy for escaping code.
static java.lang.String HTMLEscapeSP(java.lang.String s)
           
static java.lang.String[] merge(java.lang.String[] strings, java.lang.String delimiters, boolean removeNull)
          Also removes duplicates.
static java.lang.String[] mergeAT(java.lang.String[] strings, java.lang.String delimiters, boolean processAtFiles)
          Removes duplicates.
static java.lang.String[] removeDuplicates(java.lang.String[] strings, boolean removeNull)
           
static java.lang.String toListForm(java.lang.String[] strings, char delimiter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHITE_SPACE

public static final java.lang.String WHITE_SPACE
See Also:
Constant Field Values

USE_GET_CHARS

private static final boolean USE_GET_CHARS
See Also:
Constant Field Values
Constructor Detail

Strings

private Strings()
Method Detail

toListForm

public static java.lang.String toListForm(java.lang.String[] strings,
                                          char delimiter)

removeDuplicates

public static java.lang.String[] removeDuplicates(java.lang.String[] strings,
                                                  boolean removeNull)

merge

public static java.lang.String[] merge(java.lang.String[] strings,
                                       java.lang.String delimiters,
                                       boolean removeNull)
Also removes duplicates.

Parameters:
strings -
delimiters -
removeNull -
Returns:

mergeAT

public static java.lang.String[] mergeAT(java.lang.String[] strings,
                                         java.lang.String delimiters,
                                         boolean processAtFiles)
                                  throws java.io.IOException
Removes duplicates.

Parameters:
delimiters -
processAtFiles -
Returns:
Throws:
java.io.IOException

HTMLEscape

public static void HTMLEscape(java.lang.String s,
                              java.lang.StringBuffer append)
HTML attribute values can be quoted using either double or single quotes. Depending on the type of quote used, the other kind can be used unescaped within the attribute value. This method assumes that only double quotes are used for delimiting, hence this is the only kind that is escaped.


HTMLEscapeNB

public static void HTMLEscapeNB(java.lang.String s,
                                java.lang.StringBuffer append)
Same as HTMLEscape(String, StringBuffer) but also replaces spaces with " "'s, which is handy for escaping code.


HTMLEscape

public static java.lang.String HTMLEscape(java.lang.String s)

HTMLEscapeSP

public static java.lang.String HTMLEscapeSP(java.lang.String s)