Logo Search packages:      
Sourcecode: libcommons-lang-java version File versions  Download package

org::apache::commons::lang::StringUtils Class Reference

List of all members.


Detailed Description

Operations on java.lang.String that are null safe.

The StringUtils class defines certain words related to String handling.

StringUtils handles null input Strings quietly. That is to say that a null input will return null. Where a boolean or int is being returned details vary by method.

A side effect of the null handling is that a NullPointerException should be considered a bug in StringUtils (except for deprecated methods).

Methods in this class give sample code to explain their operation. The symbol * is used to indicate any input including null.

See also:
java.lang.String
Author:
Apache Jakarta Turbine

GenerationJavaCore

Jon S. Stevens

Daniel Rall

Greg Coladonato

Henri Yandell

Ed Korthof

Rand McNeely

Stephen Colebourne

Fredrik Westermarck

Holger Krauth

Alexander Day Chaffee

Henning P. Schmiedehausen

Arun Mammen Thomas

Gary Gregory

Phil Steitz

Since:
1.0
Version:
Id
StringUtils.java,v 1.107 2003/08/23 10:39:20 scolebourne Exp

Definition at line 150 of file StringUtils.java.


Public Member Functions

 StringUtils ()

Static Public Member Functions

static String abbreviate (String str, int offset, int maxWidth)
static String abbreviate (String str, int maxWidth)
static String capitalise (String str)
static String capitaliseAllWords (String str)
static String capitalize (String str)
static String center (String str, int size, String padStr)
static String center (String str, int size, char padChar)
static String center (String str, int size)
static String chomp (String str, String separator)
static String chomp (String str)
static String chompLast (String str, String sep)
static String chompLast (String str)
static String chop (String str)
static String chopNewline (String str)
static String clean (String str)
static String concatenate (Object[] array)
static boolean contains (String str, String searchStr)
static boolean contains (String str, char searchChar)
static boolean containsNone (String str, String invalidChars)
static boolean containsNone (String str, char[] invalidChars)
static boolean containsOnly (String str, String validChars)
static boolean containsOnly (String str, char[] valid)
static int countMatches (String str, String sub)
static String defaultString (String str, String defaultStr)
static String defaultString (String str)
static String deleteSpaces (String str)
static String deleteWhitespace (String str)
static String difference (String str1, String str2)
static boolean equals (String str1, String str2)
static boolean equalsIgnoreCase (String str1, String str2)
static String escape (String str)
static String getChomp (String str, String sep)
static int getLevenshteinDistance (String s, String t)
static String getNestedString (String str, String open, String close)
static String getNestedString (String str, String tag)
static String getPrechomp (String str, String sep)
static int indexOf (String str, String searchStr, int startPos)
static int indexOf (String str, String searchStr)
static int indexOf (String str, char searchChar, int startPos)
static int indexOf (String str, char searchChar)
static int indexOfAny (String str, String[] searchStrs)
static int indexOfAny (String str, String searchChars)
static int indexOfAny (String str, char[] searchChars)
static int indexOfAnyBut (String str, String searchChars)
static int indexOfAnyBut (String str, char[] searchChars)
static int indexOfDifference (String str1, String str2)
static boolean isAlpha (String str)
static boolean isAlphanumeric (String str)
static boolean isAlphanumericSpace (String str)
static boolean isAlphaSpace (String str)
static boolean isBlank (String str)
static boolean isEmpty (String str)
static boolean isNotBlank (String str)
static boolean isNotEmpty (String str)
static boolean isNumeric (String str)
static boolean isNumericSpace (String str)
static boolean isWhitespace (String str)
static String join (Iterator iterator, String separator)
static String join (Iterator iterator, char separator)
static String join (Object[] array, String separator)
static String join (Object[] array, char separator)
static String join (Object[] array)
static int lastIndexOf (String str, String searchStr, int startPos)
static int lastIndexOf (String str, String searchStr)
static int lastIndexOf (String str, char searchChar, int startPos)
static int lastIndexOf (String str, char searchChar)
static int lastIndexOfAny (String str, String[] searchStrs)
static String left (String str, int len)
static String leftPad (String str, int size, String padStr)
static String leftPad (String str, int size, char padChar)
static String leftPad (String str, int size)
static String lowerCase (String str)
static String mid (String str, int pos, int len)
static String overlay (String str, String overlay, int start, int end)
static String overlayString (String text, String overlay, int start, int end)
static String prechomp (String str, String sep)
static String repeat (String str, int repeat)
static String replace (String text, String repl, String with, int max)
static String replace (String text, String repl, String with)
static String replaceChars (String str, String searchChars, String replaceChars)
static String replaceChars (String str, char searchChar, char replaceChar)
static String replaceOnce (String text, String repl, String with)
static String reverse (String str)
static String reverseDelimited (String str, char separatorChar)
static String reverseDelimitedString (String str, String separatorChars)
static String right (String str, int len)
static String rightPad (String str, int size, String padStr)
static String rightPad (String str, int size, char padChar)
static String rightPad (String str, int size)
static String[] split (String str, String separatorChars, int max)
static String[] split (String str, String separatorChars)
static String[] split (String str, char separatorChar)
static String[] split (String str)
static String strip (String str, String stripChars)
static String strip (String str)
static String[] stripAll (String[] strs, String stripChars)
static String[] stripAll (String[] strs)
static String stripEnd (String str, String stripChars)
static String stripStart (String str, String stripChars)
static String stripToEmpty (String str)
static String stripToNull (String str)
static String substring (String str, int start, int end)
static String substring (String str, int start)
static String substringAfter (String str, String separator)
static String substringAfterLast (String str, String separator)
static String substringBefore (String str, String separator)
static String substringBeforeLast (String str, String separator)
static String substringBetween (String str, String open, String close)
static String substringBetween (String str, String tag)
static String swapCase (String str)
static String trim (String str)
static String trimToEmpty (String str)
static String trimToNull (String str)
static String uncapitalise (String str)
static String uncapitalize (String str)
static String upperCase (String str)

Static Public Attributes

static final String EMPTY = ""

Static Package Functions

 [static initializer]

Static Private Member Functions

static int min (int a, int b, int c)
static String padding (int repeat, char padChar)

Static Private Attributes

static final int PAD_LIMIT = 8192
static final String[] PADDING = new String[Character.MAX_VALUE]

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index