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  

splitInts()

   
Examples  
String numbers = "8 67 5 309"; 
int list[] = splitInts(numbers); 
// list[0] is now 8, list[1] is now 67, ... 
 
// or if the separator is not a space 
 
String numbers = "8,67,5,309"; 
int list[] = splitInts(numbers, ','); 
 
// if tabs are in-between (common for data files) use: 
// splitInts(numbers, '\t'); 

Description   A utility function which separates a group of ints embedded into a string into an array of ints. If no split character is specified, a blank space will be used as the split character.
   
Syntax  
splitInts(string)
splitInts(string, char)
   
Parameters  
string   the string to be broken into pieces

char   the character which is used to separate the values

   
Returns   int[]
   
Usage   Web & Application
   
Related   splitFloats()
splitStrings()
join()
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas