A method to reverse effect of java String.split()?
java, split, string
Solution
There's no method in the JDK for this that I'm aware of. Apache Commons Lang has various overloaded `join()` methods in the `StringUtils` class that do what you want.
Problem
I am looking for a method to combine an array of strings into a delimited String. An opposite to split(). Wanted to ask the forum before I try writing my own (since the JDK has everything)
Related problems
- How do I append a newline character for all lines except the last one?
- What's the best way to build a string of delimited items in Java?
- Algorithm for joining e.g. an array of strings
- The most sophisticated way for creating comma-separated Strings from a Collection/Array/List?
- What's the best way to build a string of delimited items in Java?