updated variable.sh

This commit is contained in:
labbots
2020-06-08 14:08:22 +01:00
parent 366cffaf5b
commit e97fca0ab5
2 changed files with 3 additions and 3 deletions

View File

@@ -1742,7 +1742,7 @@ Functions for handling variables.
### variable::is_array()
Check if given variable is array.
Note: Pass the variable name instead of value of the variable.
Pass the variable name instead of value of the variable.
#### Example

View File

@@ -4,7 +4,7 @@
# @brief Functions for handling variables.
# @description Check if given variable is array.
# Note: Pass the variable name instead of value of the variable.
# Pass the variable name instead of value of the variable.
#
# @example
# arr=("a" "b" "c")
@@ -37,7 +37,7 @@ variable::is_array() {
# @exitcode 0 If input is number.
# @exitcode 1 If input is not a number.
variable::is_numeric() {
re='^[0-9]+$'
declare re='^[0-9]+$'
if [[ ${1} =~ $re ]]; then
return 0
fi