splitString

From Bohemia Interactive Community
Revision as of 19:39, 4 August 2015 by Killzone Kid (talk | contribs) (Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.49|= Game version ______________...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.49|1.49]]
Hover & click on the images for description

Description

Description:
An SQF version of C++ strtok. Splits given string str into an array of tokens according to given delimeters.
Groups:
Uncategorised

Syntax

Syntax:
str splitString delimeters
Parameters:
str: String - A string to split
delimeters: String - one or more characters, each used as a separate delimeter.
Return Value:
Array

Examples

Example 1:
_str = "- This, is a sample string." splitString "-,. "; // ["This","is","a","sample","string"] _str joinString " "; // "This is a sample string"
Example 2:
"\A3\ui_f\data\map\vehicleicons\iconLogic_ca.paa" splitString "\."; // ["A3","ui_f","data","map","vehicleicons","iconLogic_ca","paa"]
Example 3:
"1:2:3" splitString ":"; // ["1","2","3"]

Additional Information

See also:
joinStringsetresizereverseselectinfindtoArrayforEachcountdeleteAtdeleteRangeappendsortparamparamsarrayIntersecttoStringUnicode 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

[[Category:Introduced with arma3dev version 1.49]][[ Category: arma3dev: New Scripting Commands | SPLITSTRING]][[ Category: arma3dev: Scripting Commands | SPLITSTRING]]

Notes

Bottom Section