I noticed no join method for arrays in squirrel so I made it:
Code: [Select]
Using
Code: [Select]
function join_array(arr,sep){
local i = 0;local l = arr.len();local r = "";
if(l == 0){return "";} else if(l == 1){return arr[0].tostring();} else {r=arr[0].tostring();i=1;while(i < arr.len()){r = r + sep + arr[i].tostring();i++;}return r;};
}
Using
"hello, world, true" == join_array(["hello", "world", true], ", ")