com.jrefinery.report.util
Class StringUtil

java.lang.Object
  |
  +--com.jrefinery.report.util.StringUtil

public class StringUtil
extends java.lang.Object

String utility functions.

Author:
Thomas Morgner

Constructor Summary
StringUtil()
           
 
Method Summary
static java.lang.String encodeCSS(java.lang.String s)
          Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal.
static java.lang.String encodeUTF(java.lang.String s)
          Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal.
static boolean endsWithIgnoreCase(java.lang.String base, java.lang.String end)
          Helper functions to query a strings end portion.
static boolean startsWithIgnoreCase(java.lang.String base, java.lang.String start)
          Helper functions to query a strings start portion.
 
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

startsWithIgnoreCase

public static boolean startsWithIgnoreCase(java.lang.String base,
                                           java.lang.String start)
Helper functions to query a strings start portion. The comparison is case insensitive.

Parameters:
base - the base string.
start - the starting text.
Returns:
true, if the string starts with the given starting text.

endsWithIgnoreCase

public static boolean endsWithIgnoreCase(java.lang.String base,
                                         java.lang.String end)
Helper functions to query a strings end portion. The comparison is case insensitive.

Parameters:
base - the base string.
end - the ending text.
Returns:
true, if the string ends with the given ending text.

encodeUTF

public static java.lang.String encodeUTF(java.lang.String s)
Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal. This is what happens:

Parameters:
s - The string to be encoded
Returns:
The encoded string

encodeCSS

public static java.lang.String encodeCSS(java.lang.String s)
Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal. This is what happens:

Parameters:
s - The string to be encoded
Returns:
The encoded string