{"name":"joinString","operator":null,"title":"joinString","type":"command","url":"https://community.bistudio.com/wiki/joinString","revid":377091,"updated":"2026-01-01T09:48:22Z","groups":["Strings"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.50"}],"since":{"game":"arma3","name":"Arma 3","version":"1.50"},"arma3_since":"1.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Joins *array* into String with provided *separator*. Array can be of mixed types, all elements will be converted to String prior to joining, but the fastest operation is on the array of Strings.","syntaxes":[{"syntax":"array joinString separator","since":null,"effect":null,"exec":null,"params":[{"name":"array","type":"Array of Anything","optional":false,"default":null,"description":null,"types":["Array","Anything"],"since":null,"text":"array: Array of Anything"},{"name":"separator","type":"String","optional":false,"default":null,"description":"separator used to join array elements.","types":["String"],"since":null,"text":"separator: String - separator used to join array elements."}],"returns":{"type":"String","types":["String"],"description":null,"text":"String"},"form":"binary","operator":null,"left":{"text":"array","types":["Array","Anything"]},"right":{"text":"separator","types":["String"]}}],"examples":[{"text":"```sqf\n_str = \"- This, is a sample string.\" splitString \"-,. \"; // [\"This\",\"is\",\"a\",\"sample\",\"string\"]\n_str joinString \" \"; // \"This is a sample string\"\n```","code":["_str = \"- This, is a sample string.\" splitString \"-,. \"; // [\"This\",\"is\",\"a\",\"sample\",\"string\"]\n_str joinString \" \"; // \"This is a sample string\""]},{"text":"```sqf\n[\"This\",\"is\",\"sparta\"] joinString \" ~ \"; // \"This ~ is ~ sparta\"\n```","code":["[\"This\",\"is\",\"sparta\"] joinString \" ~ \"; // \"This ~ is ~ sparta\""]},{"text":"```sqf\n[\"1\",2,text \"3\"] joinString \"\"; // \"123\"\n```","code":["[\"1\",2,text \"3\"] joinString \"\"; // \"123\""]},{"text":"```sqf\n\"Japa is the best!\" splitString \"\" joinString \" \"; // \"J a p a   i s   t h e   b e s t !\"\n```","code":["\"Japa is the best!\" splitString \"\" joinString \" \"; // \"J a p a   i s   t h e   b e s t !\""]},{"text":"Remove all \\r\\n from file:\n\n```sqf\nloadFile \"somefile.txt\" splitString toString [13,10] joinString \" \"\n```","code":["loadFile \"somefile.txt\" splitString toString [13,10] joinString \" \""]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["splitString","set","resize","reverse","select","in","find","toArray","forEach","count","deleteAt","deleteRange","append","sort","param","params","arrayIntersect","toString","endl"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Strings","Introduced with Arma 3 version 1.50","Scripting Commands"]}