com.gargoylesoftware.htmlunit.util
Class StringUtils

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.util.StringUtils

public final class StringUtils
extends Object

String utilities class for utility functions not covered by third party libraries.

Version:
$Revision: 2132 $
Author:
Daniel Gredler

Method Summary
static boolean containsWhitespace(String s)
          Returns true if the specified string contains whitespace, false otherwise.
static String escapeXmlChars(String s)
          Escapes the characters '<', '>' and '&' into their XML entity equivalents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

escapeXmlChars

public static String escapeXmlChars(String s)
Escapes the characters '<', '>' and '&' into their XML entity equivalents. Note that sometimes we have to use this method instead of StringEscapeUtils.escapeXml(String) or StringEscapeUtils.escapeHtml(String) because those methods escape some unicode characters as well.

Parameters:
s - the string to escape
Returns:
the escaped form of the specified string

containsWhitespace

public static boolean containsWhitespace(String s)
Returns true if the specified string contains whitespace, false otherwise.

Parameters:
s - the string to check for whitespace
Returns:
true if the specified string contains whitespace, false otherwise


Copyright © 2002-2010 Gargoyle Software Inc.. All Rights Reserved.