ulib: ajout de la fonction is_array()
This commit is contained in:
parent
3ccd4edc7d
commit
db24c7084f
|
@ -3,3 +3,10 @@
|
|||
##@cooked nocomments
|
||||
uprovide base.array
|
||||
urequire base.core
|
||||
|
||||
function is_array() {
|
||||
# tester si la variable $1 est un tableau
|
||||
local -a arrays
|
||||
eval "arrays=($(declare -p -a | while read dummy dummy var; do echo ${var%%=*}; done))"
|
||||
array_contains arrays "$1"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue