com.crystaldecisions.sdk.occa.report.lib
Class StringHelper

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.lib.StringHelper

public class StringHelper
extends java.lang.Object


Constructor Summary
StringHelper()
           
 
Method Summary
static java.lang.String decodeURI(java.lang.String query)
           
static java.lang.String decodeURIToSQL(java.lang.String query)
           
static java.lang.String encodeURI(java.lang.String uri, java.lang.String escapeChar)
           
static java.lang.String escapeSQL(java.lang.String expression)
           
static java.lang.String escapeURI(java.lang.String expression, java.lang.String escapeChar)
           
static java.lang.String escXML(java.lang.String s)
           
static java.util.Locale parseLocale(java.lang.String localeStr)
          Parse the input locale string and convert it into a Locale object
static java.util.TimeZone parseTimeZone(java.lang.String tzStr)
          Parse the input timezone string and convert it into a TimeZone object
static java.lang.String replace(java.lang.String s, java.lang.String s1, java.lang.String s2)
           
static java.lang.String unescXML(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringHelper

public StringHelper()
Method Detail

escXML

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

unescXML

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

replace

public static java.lang.String replace(java.lang.String s,
                                       java.lang.String s1,
                                       java.lang.String s2)

escapeSQL

public static java.lang.String escapeSQL(java.lang.String expression)

encodeURI

public static java.lang.String encodeURI(java.lang.String uri,
                                         java.lang.String escapeChar)

escapeURI

public static java.lang.String escapeURI(java.lang.String expression,
                                         java.lang.String escapeChar)

decodeURI

public static java.lang.String decodeURI(java.lang.String query)

decodeURIToSQL

public static java.lang.String decodeURIToSQL(java.lang.String query)

parseLocale

public static java.util.Locale parseLocale(java.lang.String localeStr)
Parse the input locale string and convert it into a Locale object

Parameters:
localeStr - A string representation of locale information. The locale definition is language_COUNTRY where language is a two letter ISO 639 code and COUNTRY(optional) is a two letter ISO 3166 code. If the string passed into the method is not of the correct format, the default locale of the web service will be returned.
Returns:
A Locale object based on the input string

parseTimeZone

public static java.util.TimeZone parseTimeZone(java.lang.String tzStr)
Parse the input timezone string and convert it into a TimeZone object

Parameters:
tzStr - A string representation of timezone information. The standard timezone format is defined as GMT[GMT offset]. The GMT offset is denoted as [Sign][Hours]:[Minutes] where Sign is one of + or -, Hours is a two digit hour segment of the offset, and Minutes is a two digit minute segment of the offset.
Returns:
A TimeZone object based on the input string