mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
57 lines
983 B
XML
57 lines
983 B
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>loadStrings()</name>
|
|
|
|
<category>Input/Output</category>
|
|
|
|
<subcategory>Files</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
String lines[] = loadStrings("list.txt");
|
|
println("there are " + lines.length + " lines");
|
|
for (int i=0; i < lines.length; i++) {
|
|
println(lines[i]);
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<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.
|
|
</description>
|
|
|
|
<syntax>
|
|
loadStrings(<c>filename</c>)
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>filename</label>
|
|
<description>String: name of the file or url to load</description>
|
|
</parameter>
|
|
|
|
<returns>String[]</returns>
|
|
|
|
<related>
|
|
loadBytes()
|
|
saveStrings()
|
|
saveBytes()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
<level>Extended</level>
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|