fix strip_*_space()

This commit is contained in:
Dirk 2017-12-01 20:09:16 +01:00
parent 851030ea8f
commit 99d12434dd

View File

@ -1090,10 +1090,10 @@ strip_spaces() {
# https://web.archive.org/web/20121022051228/http://codesnippets.joyent.com/posts/show/1816
strip_leading_space() {
echo "${1#"${1%%[\![:space:]]*}"}"
printf "%s" "${1#"${1%%[![:space:]]*}"}"
}
strip_trailing_space() {
echo "${1%"${1##*[![:space:]]}"}"
printf "%s" "${1%"${1##*[![:space:]]}"}"
}