toArray: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma1 |Game name=
| arma1 |Game name=
Line 9: Line 8:


|gr2= Arrays |GROUP2=
|gr2= Arrays |GROUP2=
____________________________________________________________________________________________


| Converts the supplied [[String]] into an [[Array]] of [[Number|Numbers]]. <br>
| Converts the supplied [[String]] into an [[Array]] of [[Number|Numbers]]. <br>
Line 15: Line 13:


|DESCRIPTION=
|DESCRIPTION=
____________________________________________________________________________________________


| '''toArray''' string |SYNTAX=
| '''toArray''' string |SYNTAX=
Line 22: Line 19:


| [[Array]] |RETURNVALUE=
| [[Array]] |RETURNVALUE=
____________________________________________________________________________________________


|x1= <code>[[hint]] format["%1",toArray("AaŒ")]</code> returns "[65,97,338]"|EXAMPLE1=
|x1= <code>[[hint]] format["%1",toArray("AaŒ")]</code> returns "[65,97,338]"|EXAMPLE1=
____________________________________________________________________________________________


| [[set]], [[resize]], [[reverse]], [[select]], [[in]], [[find]], [[toString]], [[forEach]], [[count]], [[deleteAt]], [[deleteRange]], [[append]], [[sort]], [[param]], [[params]], [[arrayIntersect]], [[splitString]], [[joinString]], [[toLower]], [[toUpper]], [[toFixed]], [[endl]], [[toLowerANSI]], [[toUpperANSI]], [http://www.utf8-chartable.de/ Unicode Character Table] |SEEALSO=
| [[set]], [[resize]], [[reverse]], [[select]], [[in]], [[find]], [[toString]], [[forEach]], [[count]], [[deleteAt]], [[deleteRange]], [[append]], [[sort]], [[param]], [[params]], [[arrayIntersect]], [[splitString]], [[joinString]], [[toLower]], [[toUpper]], [[toFixed]], [[endl]], [[toLowerANSI]], [[toUpperANSI]], [http://www.utf8-chartable.de/ Unicode Character Table] |SEEALSO=

Revision as of 04:58, 17 January 2021

Hover & click on the images for description

Description

Description:
Converts the supplied String into an Array of Numbers.
The numbers in the created array are the decimal Unicode representations of characters.
Groups:
StringsArrays

Syntax

Syntax:
toArray string
Parameters:
string: String
Return Value:
Array

Examples

Example 1:
hint format["%1",toArray("AaŒ")] returns "[65,97,338]"

Additional Information

See also:
setresizereverseselectinfindtoStringforEachcountdeleteAtdeleteRangeappendsortparamparamsarrayIntersectsplitStringjoinStringtoLowertoUppertoFixedendltoLowerANSItoUpperANSIUnicode Character Table

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

Notes

Bottom Section