toString: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Warning( *)\|" to "{{$1Feature$2|$Warning$2|") |
Lou Montana (talk | contribs) m (Text replacement - " +\|\$Warning( *)\|" to " |$1Warning$1|") |
||
Line 11: | Line 11: | ||
| Converts the supplied [[Array]] of [[Number|Numbers]] into a [[String]]. <br> | | Converts the supplied [[Array]] of [[Number|Numbers]] into a [[String]]. <br> | ||
The numbers in the array to be converted are the decimal [http://en.wikipedia.org/wiki/Unicode Unicode] representations of characters. | The numbers in the array to be converted are the decimal [http://en.wikipedia.org/wiki/Unicode Unicode] representations of characters. | ||
{{Feature | | {{Feature | Warning | This command expects array of numbers. If array contains non-number values, the following error might appear in .rpt file: <tt>Bad conversion: scalar</tt>}} | ||
| '''toString''' array | | '''toString''' array |
Revision as of 00:33, 7 February 2021
Description
- Description:
- Description needed
- Groups:
- StringsArrays
Syntax
- Syntax:
- Syntax needed
- Parameters:
- array: Array
- Return Value:
- Return value needed
Examples
- Example 1:
hint toString [65,97,338];
returns "AaŒ"- Example 2:
["test","test"] joinString toString [12345] splitString toString [12345]; // ["test","test"]
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on February 10, 2015 - 21:05 (UTC)
- DreadedEntity
-
Tabs and new lines can be created with toString [9] and toString [10], respectively. Alternatively, a new line can also be created with toString [92,110] ("\n"). If you save these strings into a variable, they can be manipulated like any other string. For example, the following code will work just fine and return the expected output:
_tab = toString [9]; for "_i" from 0 to 3 do { _tab = _tab + (toString [9]); }; copyToClipboard format ["x%1x",tab];
- Posted on August 25, 2015 - 09:58 (UTC)
- Killzone Kid
- While you can convert any String to Array with toArray command, only numbers from 1 to 55295 (not 65535 as expected) can be successfully converted to String with toString and then back to Array with toArray without loss of data.