net.sf.tacos.util
Class StringUtils

java.lang.Object
  extended bynet.sf.tacos.util.StringUtils

public final class StringUtils
extends Object

Provides commonly used string functions not provided by other String based libraries.

Author:
jkuhnert

Field Summary
static String BEGIN_COMMENT
          XML cdata start
static String END_COMMENT
          XML character data end
protected static String JS_PATTERN
          Javascript regexp string looking for
 
Constructor Summary
StringUtils()
           
 
Method Summary
static String ensureValidScriptTags(String input)
          Takes any tags found in the specified input string and replaces their contents into one large block (meaning if multiple script blocks are found, they will be turned into one), with the addition of BEGIN_COMMENT inserted before the logic block and END_COMMENT inserted after the logic block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JS_PATTERN

protected static final String JS_PATTERN
Javascript regexp string looking for

See Also:
Constant Field Values

BEGIN_COMMENT

public static final String BEGIN_COMMENT
XML cdata start

See Also:
Constant Field Values

END_COMMENT

public static final String END_COMMENT
XML character data end

See Also:
Constant Field Values
Constructor Detail

StringUtils

public StringUtils()
Method Detail

ensureValidScriptTags

public static String ensureValidScriptTags(String input)
Takes any tags found in the specified input string and replaces their contents into one large block (meaning if multiple script blocks are found, they will be turned into one), with the addition of BEGIN_COMMENT inserted before the logic block and END_COMMENT inserted after the logic block.

Parameters:
input - The string to replace tags on
Returns:
The properly formatted string, if any formatting needed to occur.