com.gargoylesoftware.htmlunit.util
Class StringUtils

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

public final class StringUtils
extends java.lang.Object

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

Version:
$Revision: 1.3 $
Author:
Daniel Gredler

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

Method Detail

containsWhitespace

public static boolean containsWhitespace(java.lang.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

escapeXmlChars

public static java.lang.String escapeXmlChars(java.lang.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


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.