org.xwiki.gwt.user.client
Class StringUtils

java.lang.Object
  extended by org.xwiki.gwt.user.client.StringUtils

public class StringUtils
extends java.lang.Object

Operations on Strings.

Version:
$Id: StringUtils.java 28843 2010-05-12 12:46:22Z mflorea $

Constructor Summary
protected StringUtils()
          Constructor.
 
Method Summary
static boolean areEqual(java.lang.String expected, java.lang.String actual)
           
static boolean isEmpty(java.lang.String str)
          Check is a String is empty ("") or null.
static java.lang.String substringAfterLast(java.lang.String str, java.lang.String pattern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

protected StringUtils()
Constructor.

Method Detail

isEmpty

public static boolean isEmpty(java.lang.String str)
Check is a String is empty ("") or null.

Parameters:
str - String to inspect.
Returns:
true if the string is empty or null, false otherwise.

substringAfterLast

public static java.lang.String substringAfterLast(java.lang.String str,
                                                  java.lang.String pattern)
Parameters:
str - the string to search in
pattern - the pattern to search in str
Returns:
the substring in str after the last occurrence of pattern, or the full str if pattern does not appear

areEqual

public static boolean areEqual(java.lang.String expected,
                               java.lang.String actual)
Parameters:
expected - the expected string
actual - the actual string
Returns:
true if the given strings are equal, false otherwise


Copyright © 2004-2010 XWiki. All Rights Reserved.