Class StringUtils
java.lang.Object
org.apache.maven.surefire.util.internal.StringUtils
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if a (trimmed) String isnullor blank.static booleanisNotBlank(String str) Checks if a (trimmed) String is notnulland not blank.static String[]static booleanstartsWith(StringBuffer buffer, String pattern) Determines ifbufferstarts with specific literal(s).
-
Field Details
-
NL
-
-
Constructor Details
-
StringUtils
private StringUtils()
-
-
Method Details
-
split
-
isBlank
Checks if a (trimmed) String is
nullor blank.- Parameters:
str- the String to check- Returns:
trueif the String isnull, or length zero once trimmed
-
isNotBlank
Checks if a (trimmed) String is not
nulland not blank.- Parameters:
str- the String to check- Returns:
trueif the String is notnulland length of trimmedstris not zero.
-
startsWith
Determines ifbufferstarts with specific literal(s).- Parameters:
buffer- Examined StringBufferpattern- a pattern which should start inbuffer- Returns:
trueif buffer's literal starts with givenpattern, or both are empty.
-