Class StringUtils
- java.lang.Object
-
- org.apache.maven.surefire.util.internal.StringUtils
-
public final class StringUtils extends java.lang.Object
Common
java.lang.String
manipulation routines.
Originally from Turbine and the GenerationJavaCore library.
NOTE: This class is not part of any api and is public purely for technical reasons !- Since:
- 1.0
- Version:
- $Id: StringUtils.java 8001 2009-01-03 13:17:09Z vsiveton $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NL
-
Constructor Summary
Constructors Modifier Constructor Description private
StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isBlank(java.lang.String str)
Checks if a (trimmed) String isnull
or blank.static boolean
isNotBlank(java.lang.String str)
Checks if a (trimmed) String is notnull
and not blank.static java.lang.String[]
split(java.lang.String text, java.lang.String separator)
static boolean
startsWith(java.lang.StringBuffer buffer, java.lang.String pattern)
Determines ifbuffer
starts with specific literal(s).
-
-
-
Method Detail
-
split
public static java.lang.String[] split(java.lang.String text, java.lang.String separator)
-
isBlank
public static boolean isBlank(java.lang.String str)
Checks if a (trimmed) String is
null
or blank.- Parameters:
str
- the String to check- Returns:
true
if the String isnull
, or length zero once trimmed
-
isNotBlank
public static boolean isNotBlank(java.lang.String str)
Checks if a (trimmed) String is not
null
and not blank.- Parameters:
str
- the String to check- Returns:
true
if the String is notnull
and length of trimmedstr
is not zero.
-
startsWith
public static boolean startsWith(java.lang.StringBuffer buffer, java.lang.String pattern)
Determines ifbuffer
starts with specific literal(s).- Parameters:
buffer
- Examined StringBufferpattern
- a pattern which should start inbuffer
- Returns:
true
if buffer's literal starts with givenpattern
, or both are empty.
-
-