Subversion Repositories pub

Compare Revisions

Ignore whitespace Rev 511 → Rev 512

/video-contact-sheet/branches/1.13/dist/vcs
1006,10 → 1006,12
## Bool (0 or 1)
is_bool() { [[ ($1 == '0') || ($1 == '1') ]] 2>/dev/null ; }
## Float (XX.YY; XX.; ;.YY) (.24=0.24)
is_float() { local P='^([0-9]+\.?([0-9])?+|(\.[0-9]+))$' ; [[ $1 =~ $P ]] ; }
## XXX: 1.12.3: '^([0-9]+\.?([0-9])?+|(\.[0-9]+))$'
is_float() { local P='^([0-9]+\.?[0-9]*|\.[0-9]+)$' ; [[ $1 =~ $P ]] ; }
## Percentage (xx% or xx.yy%)
## XXX: 1.12.3: '^([0-9]+\.?([0-9])?+|(\.[0-9]+))%$'
is_percentage() {
local P='^([0-9]+\.?([0-9])?+|(\.[0-9]+))%$'
local P='^([0-9]+\.?[0-9]*|\.[0-9]+)%$'
[[ $1 =~ $P ]]
}
## Interval