join
Creates a string with toString()
of each object with the given separator.
expect:
join(",", new Object[]{"a"}) == "a"
join(",", new Object[]{"a", "b", "c"}) == "a,b,c"
join(",", new Object[]{}) == ""
Content copied to clipboard
separator
must not be null and objects
must not be null.Return
The joined string
Parameters
separator
The string by which to join each string representation
objects
The objects to join the string representations of
Creates a string with toString()
of each object with the given separator.
expect:
join(",", ["a"]) == "a"
join(",", ["a", "b", "c"]) == "a,b,c"
join(",", []) == ""
Content copied to clipboard
separator
must not be null and objects
must not be null.Return
The joined string
Parameters
separator
The string by which to join each string representation
objects
The objects to join the string representations of