Commit e0d8af3b authored by Vincent Driessen's avatar Vincent Driessen

Fix: endswith() implementation actually was a startswith() implementation.

parent f9ebb076
...@@ -32,7 +32,7 @@ max() { [ "$1" -ge "$2" ] && echo "$1" || echo "$2"; } ...@@ -32,7 +32,7 @@ max() { [ "$1" -ge "$2" ] && echo "$1" || echo "$2"; }
# basic string matching # basic string matching
startswith() { [ "$1" != "${1#$2}" ]; } startswith() { [ "$1" != "${1#$2}" ]; }
endswith() { [ "$1" != "${1#$2}" ]; } endswith() { [ "$1" != "${1%$2}" ]; }
# convenience functions for checking shFlags flags # convenience functions for checking shFlags flags
flag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -eq $FLAGS_TRUE ]; } flag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -eq $FLAGS_TRUE ]; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment