Name

saveStrings()

Examples
words = "apple bear cat dog"
list = split(words, ' ')
# Writes the strings to a file, each on a separate line
saveStrings("nouns.txt", list)
Description Writes a list of strings to a file, one line per string. By default, this file is saved to the sketch's folder. This folder is opened by selecting "Show Sketch Folder" from the "Sketch" menu.

Alternatively, the file can be saved to any location on the computer by using an absolute path (something that starts with / on Unix and Linux, or a drive letter on Windows).

Starting with Processing 1.0, all files loaded and saved by the Processing API use UTF-8 encoding. In earlier releases, the default encoding for your platform was used, which causes problems when files are moved to other platforms.
Syntax
saveStrings(filename, data)
Parameters
filenameString: filename for output
datastring list to be written
Related loadStrings()
loadBytes()
saveBytes()

Updated on Tue Feb 27 14:07:12 2024.

If you see any errors or have comments, please let us know.