Reference for Processing version 1.2. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name

saveStrings()

Examples
String words = "apple bear cat dog";
String[] list = split(words, ' ');

// now write the strings to a file, each on a separate line
saveStrings("nouns.txt", list);
Description Writes an array of strings to a file, one line per string. This file is saved to the sketch's folder, which is opened by selecting "Show sketch folder" from the "Sketch" menu.

It is not possible to use saveXxxxx() methods inside a web browser unless the sketch is signed. To save a file back to a server, see the save to web example.

Starting with Processing release 0134, all files loaded and saved by the Processing API use UTF-8 encoding. In previous releases, the default encoding for your platform was used, which causes problems when files are moved to other platforms.
Syntax
saveStrings(filename, strings)
Parameters
filename filename for output
strings string array to be written
Usage Application
Related loadStrings()
loadBytes()
saveBytes()
Updated on June 14, 2010 12:05:29pm EDT

Creative Commons License