Simplify isnull to use case
This commit is contained in:
parent
d6df0f1453
commit
da65f512a7
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ echo_git() { xecho "$@" ; } # Code clarity
|
||||||
echo_info() { xecho "gcrypt:" "$@" >&2; }
|
echo_info() { xecho "gcrypt:" "$@" >&2; }
|
||||||
echo_die() { echo_info "$@" ; exit 1; }
|
echo_die() { echo_info "$@" ; exit 1; }
|
||||||
|
|
||||||
isnull() { [ 0 = "${#1}" ]; }
|
isnull() { case "${1}" in "") true;; *) false;; esac; }
|
||||||
isnonnull() { ! isnull "$1"; }
|
isnonnull() { ! isnull "$1"; }
|
||||||
iseq() { isnull "${1#"$2"}"; }
|
iseq() { isnull "${1#"$2"}"; }
|
||||||
isnoteq() { ! iseq "$@"; }
|
isnoteq() { ! iseq "$@"; }
|
||||||
|
|
Loading…
Reference in a new issue