Android examples for java.lang:String Join
join Iterable<String> to string
import android.content.Context; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static String joinStrings(String joiner, Iterable<String> parts) { StringBuilder builder = new StringBuilder(); boolean first = true; for (String part : parts) { if (!first) { builder.append(joiner);/* w w w. j av a 2s. c om*/ } builder.append(part); first = false; } return builder.toString(); } }