Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

splitStrings()

   
Examples  
String words = "apple bear cat dog"; 
String list[] = splitStrings(words); 
// list[0] is now "apple", list[1] is now "bear", ... 
 
// or if the separator is not a space 
 
String words = "apple,bear,cat,dog"; 
String list[] = splitStrings(words, ','); 
 
// if tabs are in-between (common for data files) use: 
// splitStrings(words, '\t'); 

Description   A utility function which separates a group of strings embedded into a longer string into an array of strings. If no split character is specified, a blank space will be used as the split character.
   
Syntax  
splitStrings(string)
splitStrings(string, char)
   
Returns   String[]
   
Usage   Web & Application
   
Related   String
splitInts()
splitFloats()
join()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas