zarqon
Well-known member
I'm working on a script that handles comma-delimited lists, and I've been searching ASH for a string-handling function that will assemble a string[int] such as what results from split_string() into a string. Basically, the equivalent of PHP's implode().
Then, using my imaginary desired function
string implode(string[int] source, string glue)
Using ashref didn't show me anything that seemed to do this, but perhaps I didn't search correctly.
Anyone know of a solution?
And while I'm at it, anyone know of a way to delete one index => value pair from a map? (besides copying everything except that one pair over to a new map).
PHP:
string[int] animals
animals[0] => "lions"
animals[1] => "tigers"
animals[2] => "bears"
animals[3] => "oh my!"
Then, using my imaginary desired function
string implode(string[int] source, string glue)
PHP:
string animalstring = implode(animals,", ");
animalstring => "lions, tigers, bears, oh my!"
Using ashref didn't show me anything that seemed to do this, but perhaps I didn't search correctly.
Anyone know of a solution?
And while I'm at it, anyone know of a way to delete one index => value pair from a map? (besides copying everything except that one pair over to a new map).