Community discussions

MikroTik App
 
jeroenp
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam
Contact:

inverse of :toarray to create a CSV string

Thu Oct 13, 2016 4:33 pm

I posted in the wrong forum before, so I will delete this from "General" soon: http://forum.mikrotik.com/viewtopic.php?f=2&t=113373 as it better fits the Scripting forum:

`:toarray` can be used to split a CSV string into parts as documented at http://wiki.mikrotik.com/wiki/Script_to ... f_the_week

What is the inverse? i.e. how can you convert an array of strings into a CSV string (apart from manually coding a loop)?

--jeroen
 
jeroenp
Member Candidate
Member Candidate
Topic Author
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam
Contact:

Re: inverse of :toarray to create a CSV string

Mon Oct 31, 2016 1:03 pm

Bump.

Anyone having a good idea for this (apart from manually assembling the CSV).

--jeroen
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6111
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: inverse of :toarray to create a CSV string

Mon Oct 31, 2016 1:37 pm

[admin@rack1_hexv3_down] /system script> :global aa {"a";"b";"c"}
[admin@rack1_hexv3_down] /system script> :put [:tostr $aa]
a;b;c

Who is online

Users browsing this forum: Bing [Bot] and 26 guests