]> git.corax.cc Git - toolbox/commit
include/array: Add function for checking if an element is in an array
authorMatthias Kruk <m@m10k.eu>
Wed, 24 Mar 2021 22:24:30 +0000 (07:24 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 24 Mar 2021 22:24:30 +0000 (07:24 +0900)
commit1b9ef1089ad599a98791baefa825c6f2b6925724
treec635d40aa4285f68057fa56d9d3ef6960cd4fa81
parentbbd6a465ab6c3dfc96e0c63f0a42808a9f88302d
include/array: Add function for checking if an element is in an array

Bash doesn't provide a simple way to check if an element is in an array.
This commit adds the array_contains convenience function to solve that
problem.
include/array.sh [new file with mode: 0644]