org.eclipse.net4j.util
Class StringUtil

java.lang.Object
  extended by org.eclipse.net4j.util.StringUtil

public final class StringUtil
extends Object

Author:
Eike Stepper

Field Summary
static String EMPTY
           
static String NL
           
 
Method Summary
static String cap(String str)
           
static String capAll(String str)
           
static int compare(String s1, String s2)
           
static boolean equalsUpperOrLowerCase(String s, String upperOrLowerCase)
           
static String formatException(Throwable t)
           
static boolean glob(String pattern, String string)
          Matches a string against a pattern.
static boolean glob(String pattern, String string, String[] subStrings)
          Matches a string against a pattern and fills an array with the sub-matches.
static boolean isEmpty(String str)
           
static int occurrences(String str, char c)
           
static int occurrences(String str, String c)
           
static String replace(String text, String[] find, String[] replace)
           
static String safe(String str)
           
static String uncap(String str)
           
static String uncapAll(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final String EMPTY
See Also:
Constant Field Values

NL

public static final String NL
Method Detail

formatException

public static String formatException(Throwable t)
Since:
2.0

replace

public static String replace(String text,
                             String[] find,
                             String[] replace)

safe

public static String safe(String str)

compare

public static int compare(String s1,
                          String s2)

equalsUpperOrLowerCase

public static boolean equalsUpperOrLowerCase(String s,
                                             String upperOrLowerCase)
Since:
3.1

capAll

public static String capAll(String str)
Since:
2.0

uncapAll

public static String uncapAll(String str)
Since:
2.0

cap

public static String cap(String str)

uncap

public static String uncap(String str)

occurrences

public static int occurrences(String str,
                              char c)

occurrences

public static int occurrences(String str,
                              String c)

isEmpty

public static boolean isEmpty(String str)

glob

public static boolean glob(String pattern,
                           String string)
Matches a string against a pattern.

Pattern description:

Since:
2.0

glob

public static boolean glob(String pattern,
                           String string,
                           String[] subStrings)
Matches a string against a pattern and fills an array with the sub-matches.

Pattern description:

Since:
2.0


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.