aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils/text.sh
diff options
context:
space:
mode:
Diffstat (limited to '%HOME%/.bash_utils/text.sh')
-rw-r--r--%HOME%/.bash_utils/text.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/%HOME%/.bash_utils/text.sh b/%HOME%/.bash_utils/text.sh
index 242837f..aefe453 100644
--- a/%HOME%/.bash_utils/text.sh
+++ b/%HOME%/.bash_utils/text.sh
@@ -81,13 +81,13 @@ str_starts_with() (
if [ "$#" -ne 2 ]; then
echo "usage: ${FUNCNAME[0]} STR SUB"
return 1
- fi
+ fi
- local str="$1"
- local sub
- sub="$( printf -- '%q' "$2" )"
+ local str="$1"
+ local sub
+ sub="$( printf -- '%q' "$2" )"
- test "$str" != "${str#$sub}"
+ test "$str" != "${str#$sub}"
)
str_split() (
@@ -136,7 +136,7 @@ str_split() (
IFS="$old_delim" read -a xs -r <<< "$str"
for x in ${xs[@]+"${xs[@]}"}; do
- printf "$fmt" "$x"
+ printf -- "$fmt" "$x"
done
)