INNER CODE UNIT · Shell
array_split
gruntwork-io/bash-commons · modules/bash-commons/src/array.sh:31
function array_split {
local -r separator="$1"
local -r str="$2"
local -a ary=()
IFS="$separator" read -a ary <<<"$str"
echo ${ary[*]}
}
# Joins the elements of the given array into a string with the given separator between each element.
#
# Examples:
#
# array_join "," ("A" "B" "C")
# Returns: "A,B,C"
#
function array_join {