Added EscapeDoubleQuotes function
This commit is contained in:
parent
cf609998aa
commit
fa64c49244
|
@ -8,7 +8,7 @@
|
|||
#### OFUNCTIONS FULL SUBSET ####
|
||||
#### OFUNCTIONS MINI SUBSET ####
|
||||
_OFUNCTIONS_VERSION=2.3.0-dev
|
||||
_OFUNCTIONS_BUILD=2018070202
|
||||
_OFUNCTIONS_BUILD=2018070301
|
||||
#### _OFUNCTIONS_BOOTSTRAP SUBSET ####
|
||||
_OFUNCTIONS_BOOTSTRAP=true
|
||||
#### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
|
||||
|
@ -1257,6 +1257,13 @@ function EscapeSpaces {
|
|||
echo "${string// /\\ }"
|
||||
}
|
||||
|
||||
# Usage var=$(EscapeDoubleQuotes "$var") or var="$(EscapeDoubleQuotes "$var")"
|
||||
function EscapeDoubleQuotes {
|
||||
local value="${1}"
|
||||
|
||||
echo "${value//\"/\\\"}"
|
||||
}
|
||||
|
||||
function IsNumericExpand {
|
||||
eval "local value=\"${1}\"" # Needed eval so variable variables can be processed
|
||||
|
||||
|
|
Loading…
Reference in New Issue