diff --git a/scripts/common/string.sh b/scripts/common/string.sh new file mode 100644 index 0000000..13f89b3 --- /dev/null +++ b/scripts/common/string.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +[ -n "${_STRING_SH_}" ] && return || readonly _STRING_SH_=1 +[ -n "${_VERBOSE_}" ] && echo "-- INCLUDE: string.sh" + +_startswith() { [ "$1" != "${1#$2}" ]; } +_endswith() { [ "$1" != "${1%$2}" ]; }