Spring - StringUtils split example
split(String toSplit, String delimiter)
Split a String at the first occurrence of the delimiter.Method:
public static String[] split(@Nullable String toSplit, @Nullable String delimiter)
Example:
String[] list = StringUtils.split("Hello1, Hello2", ",");Split a String at the first occurrence of the delimiter. Does not include the delimiter in the result.
Parameters:
toSplit - the string to split (potentially null or empty)delimiter - to split the string up with (potentially null or empty)
Comments
Post a Comment