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  

splitFloats()

   
Examples  
String numbers = "8.67 5.309 1.334"; 
float list[] = splitFloats(numbers); 
// list[0] is now 8.67, list[1] is now 5.309, ... 
 
// or if the separator is not a space 
 
String numbers = "8.67,5.309,1.334"; 
float list[] = splitFloats(numbers, ','); 
 
// if tabs are in-between (common for data files) use: 
// splitFloats(numbers, '\t'); 

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

char   the character which is used to separate the values

   
Returns   float[]
   
Usage   Web & Application
   
Related   float
splitInts()
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