mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
59 lines
1.1 KiB
XML
59 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
|
|
<name>str()</name>
|
|
|
|
<category>Data</category>
|
|
|
|
<subcategory>Conversion</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
boolean b = false;
|
|
byte y = -28;
|
|
char c = 'R';
|
|
float f = -32.6;
|
|
int i = 1024;
|
|
|
|
String sb = str(b);
|
|
String sy = str(y);
|
|
String sc = str(c);
|
|
String sf = str(f);
|
|
String si = str(i);
|
|
|
|
sb = sb + sy + sc + sf + si + sh;
|
|
|
|
println(sb); // Prints 'false-28R-32.61024'
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Returns the string representation of primitive datatypes and arrays. For example the integer 3 will return the string "3", the float -12.6 will return the string "-12.6", and a boolean value true will return the string "true".
|
|
</description>
|
|
|
|
<syntax>
|
|
str(<c>data</c>)
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>data</label>
|
|
<description>boolean, byte, char, float, int, boolean[], byte[], char[], float[], int[]</description>
|
|
</parameter>
|
|
|
|
<returns>String or String[]</returns>
|
|
|
|
<related>
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
</root>
|