Re: String[] to String



Sathyaish wrote:
It is amazing that java.lang.String class has a split method but no
reverse mechanism for joining, like the "join" method some languages
such as VB/VB.NET and the .NET framework support.

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#split(java.lang.String)

What in the world are you talking about? Of course it does, and it's way older than the split() method!

String [] a = some.split( regex );
String join = "";
for ( String s : a )
{
join = join + s;
}

--
Lew
.



Relevant Pages

  • Re: String[] to String
    ... reverse mechanism for joining, like the "join" method some languages ... such as VB/VB.NET and the .NET framework support. ... Oliver ...
    (comp.lang.java.programmer)
  • Re: String[] to String
    ... It is amazing that java.lang.String class has a split method but no ... reverse mechanism for joining, like the "join" method some languages ...
    (comp.lang.java.programmer)