+is_in_list_separator_helper () {
+ local sep=${1}
+ shift
+ local element=${1}
+ shift
+ local list=${*}
+ echo ${list} | grep -qe "^\(.*${sep}\)\?${element}\(${sep}.*\)\?$"
+}
+
+is_in_space_sep_list () {
+ local element=${1}
+ shift
+ is_in_list_separator_helper "[[:space:]]" "${element}" "${*}"
+}
+
+is_in_comma_sep_list () {
+ local element=${1}
+ shift
+ is_in_list_separator_helper "," "${element}" "${*}"
+}
+