Java org.springframework.util StringUtils fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.util StringUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.util StringUtils.

The text is from its open source code.

Subclass

org.springframework.util.StringUtils has subclasses.
Click this link to see all its subclasses.

Method

String[]addStringToArray(@Nullable String[] array, String str)
Append the given String to the given String array, returning a new array consisting of the input array contents plus the given String .
StringapplyRelativePath(String path, String relativePath)
Apply the given relative path to the given Java resource path, assuming standard Java folder separation (i.e.
StringarrayToCommaDelimitedString(@Nullable Object[] arr)
Convert a String array into a comma delimited String (i.e., CSV).
StringarrayToDelimitedString(@Nullable Object[] arr, String delim)
Convert a String array into a delimited String (e.g.
Stringcapitalize(String str)
Capitalize a String , changing the first letter to upper case as per Character#toUpperCase(char) .
StringcleanPath(String path)
Normalize the path by suppressing sequences like "path/.."
StringcollectionToCommaDelimitedString(@Nullable Collection coll)
Convert a Collection into a delimited String (e.g., CSV).
StringcollectionToDelimitedString(@Nullable Collection coll, String delim)
Convert a Collection into a delimited String (e.g.
StringcollectionToDelimitedString(@Nullable Collection coll, String delim, String prefix, String suffix)
Convert a Collection to a delimited String (e.g.
SetcommaDelimitedListToSet(@Nullable String str)
Convert a comma delimited list (e.g., a row from a CSV file) into a set.
String[]commaDelimitedListToStringArray(@Nullable String str)
Convert a comma delimited list (e.g., a row from a CSV file) into an array of strings.
String[]concatenateStringArrays(@Nullable String[] array1, @Nullable String[] array2)
Concatenate the given String arrays into one, with overlapping array elements included twice.
booleancontainsWhitespace(@Nullable CharSequence str)
Check whether the given CharSequence contains any whitespace characters.
booleancontainsWhitespace(@Nullable String str)
Check whether the given String contains any whitespace characters.
intcountOccurrencesOf(String str, String sub)
Count the occurrences of the substring sub in string str .
Stringdelete(String inString, String pattern)
Delete all occurrences of the given substring.
StringdeleteAny(String inString, @Nullable String charsToDelete)
Delete any character in a given String .
String[]delimitedListToStringArray(@Nullable String str, @Nullable String delimiter)
Take a String that is a delimited list and convert it into a String array.
String[]delimitedListToStringArray(@Nullable String str, @Nullable String delimiter, @Nullable String charsToDelete)
Take a String that is a delimited list and convert it into a String array.
booleanendsWithIgnoreCase(@Nullable String str, @Nullable String suffix)
Test if the given String ends with the specified suffix, ignoring upper/lower case.
StringgetFilename(@Nullable String path)
Extract the filename from the given Java resource path, e.g.
StringgetFilenameExtension(@Nullable String path)
Extract the filename extension from the given Java resource path, e.g.
booleanhasLength(@Nullable CharSequence str)
Check that the given CharSequence is neither null nor of length 0.
booleanhasLength(@Nullable String str)
Check that the given String is neither null nor of length 0.
booleanhasText(@Nullable CharSequence str)
Check whether the given CharSequence contains actual text.
booleanhasText(@Nullable String str)
Check whether the given String contains actual text.
booleanisEmpty(@Nullable Object str)
Check whether the given object (possibly a String ) is empty.
String[]mergeStringArrays(@Nullable String[] array1, @Nullable String[] array2)
Merge the given String arrays into one, with overlapping array elements only included once.
LocaleparseLocale(String localeValue)
Parse the given String value into a Locale , accepting the Locale#toString format as well as BCP 47 language tags.
LocaleparseLocaleString(String localeString)
Parse the given String representation into a Locale .
TimeZoneparseTimeZoneString(String timeZoneString)
Parse the given timeZoneString value into a TimeZone .
booleanpathEquals(String path1, String path2)
Compare two paths after normalization of them.
Stringquote(@Nullable String str)
Quote the given String with single quotes.
ObjectquoteIfString(@Nullable Object obj)
Turn the given Object into a String with single quotes if it is a String ; keeping the Object as-is else.
Stringreplace(String inString, String oldPattern, @Nullable String newPattern)
Replace all occurrences of a substring within a string with another string.
String[]split(@Nullable String toSplit, @Nullable String delimiter)
Split a String at the first occurrence of the delimiter.
PropertiessplitArrayElementsIntoProperties(String[] array, String delimiter)
Take an array of strings and split each element based on the given delimiter.
booleanstartsWithIgnoreCase(@Nullable String str, @Nullable String prefix)
Test if the given String starts with the specified prefix, ignoring upper/lower case.
StringstripFilenameExtension(String path)
Strip the filename extension from the given Java resource path, e.g.
booleansubstringMatch(CharSequence str, int index, CharSequence substring)
Test whether the given string matches the given substring at the given index.
String[]tokenizeToStringArray(@Nullable String str, String delimiters)
Tokenize the given String into a String array via a StringTokenizer .
String[]tokenizeToStringArray(@Nullable String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens)
Tokenize the given String into a String array via a StringTokenizer .
StringtoLanguageTag(Locale locale)
Determine the RFC 3066 compliant language tag, as used for the HTTP "Accept-Language" header.
String[]toStringArray(@Nullable Collection collection)
Copy the given Collection into a String array.
String[]toStringArray(@Nullable Enumeration enumeration)
Copy the given Enumeration into a String array.
StringtrimAllWhitespace(String str)
Trim all whitespace from the given String : leading, trailing, and in between characters.
String[]trimArrayElements(String[] array)
Trim the elements of the given String array, calling String.trim() on each of them.
StringtrimLeadingCharacter(String str, char leadingCharacter)
Trim all occurrences of the supplied leading character from the given String .
StringtrimLeadingWhitespace(String str)
Trim leading whitespace from the given String .
StringtrimTrailingCharacter(String str, char trailingCharacter)
Trim all occurrences of the supplied trailing character from the given String .
StringtrimTrailingWhitespace(String str)
Trim trailing whitespace from the given String .
StringtrimWhitespace(String str)
Trim leading and trailing whitespace from the given String .
Stringuncapitalize(String str)
Uncapitalize a String , changing the first letter to lower case as per Character#toLowerCase(char) .
Stringunqualify(String qualifiedName)
Unqualify a string qualified by a '.'