misc: comments

This commit is contained in:
Dylan Araps 2021-07-19 08:11:13 +03:00
parent f70bc4c35c
commit 650e786edb
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

4
kiss
View File

@ -45,10 +45,14 @@ contains() {
} }
equ() { equ() {
# Check if a string is equal to enother.
# This replaces '[ "$var" = str ]' and '[ "$var" != str ]'.
case $1 in "$2") return 0 ;; *) return 1; esac case $1 in "$2") return 0 ;; *) return 1; esac
} }
ok() { ok() {
# Check if a string is non-null.
# This replaces '[ "$var" ]', '[ -n "$var" ]' and '[ -z "$var" ]'.
case $1 in '') return 1 ;; *) return 0; esac case $1 in '') return 1 ;; *) return 0; esac
} }