FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

join()

   
Examples  
String[] animals = new String[3]; 
animals[0] = "cat"; 
animals[1] = "seal"; 
animals[2] = "bear"; 
String joinedAnimals = join(animals, " : "); 
println(joinedAnimals); // Prints "cat : seal : bear" 
 
// Joining an array of ints requires first 
// converting to an array of Strings 
int[] numbers = new int[3]; 
numbers[0] = 8; 
numbers[1] = 67; 
numbers[2] = 5; 
String joinedNumbers = join(nf(numbers, 0), ", "); 
println(joinedNumbers); // Prints "8, 67, 5" 
 

Description   Combines an array of Strings into one String. To join arrays of ints or floats, it's necessary to first convert them to strings using nf() or nfs().
   
Syntax  
join(stringArray, separator)
   
Parameters  
stringArray   array of Strings

separator   char or String: char or String to be placed between each item

   
Returns   String
   
Usage   Web & Application
   
Related   split()
 
 






   
 
Updated: Fri Jul 15 16:35:42 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info