org.apache.maven.surefire.util.internal
Class StringUtils

java.lang.Object
  extended by org.apache.maven.surefire.util.internal.StringUtils

public class StringUtils
extends Object

Common String manipulation routines.

Originally from Turbine and the GenerationJavaCore library.

Since:
1.0
Version:
$Id: StringUtils.java 8001 2009-01-03 13:17:09Z vsiveton $
Author:
Jon S. Stevens, Daniel Rall, Greg Coladonato, Henri Yandell, Ed Korthof, Rand McNeely, Stephen Colebourne, Fredrik Westermarck, Holger Krauth, Alexander Day Chaffee, Vincent Siveton

Constructor Summary
StringUtils()
           
 
Method Summary
static boolean isBlank(String str)
          Checks if a (trimmed) String is null or blank.
static String replace(String text, String repl, String with)
          Replace all occurrences of a String within another String.
static String[] split(String text, String separator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

split

public static String[] split(String text,
                             String separator)

replace

public static String replace(String text,
                             String repl,
                             String with)

Replace all occurrences of a String within another String.

A null reference passed to this method is a no-op.

Parameters:
text - text to search and replace in
repl - String to search for
with - String to replace with
Returns:
the text with any replacements processed

isBlank

public static boolean isBlank(String str)

Checks if a (trimmed) String is null or blank.

Parameters:
str - the String to check
Returns:
true if the String is null, or length zero once trimmed


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.