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  

loadStrings()

   
Examples  
String lines[] = loadStrings("list.txt"); 
println("there are " + lines.length + " lines"); 
for (int i=0; i < lines.length; i++) { 
  println(lines[i]); 
} 

Description   Reads the contents of a file or url and creates a String array of its individual lines. If a file is specified, it must be located in the sketch's "data" directory/folder.
   
Syntax  
loadStrings(filename)
   
Parameters  
filename   String: name of the file or url to load

   
Returns   String[]
   
Usage   Web & Application
   
Related   loadBytes()
saveStrings()
saveBytes()
 
 






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








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