ez.no / exponential / documentation / reference / template operators / variables / is_float
$input|is_float( test )
| Name | Type | Description | Required |
|---|---|---|---|
| test | any | Variable to test. | only if input is omitted |
true of false, see description for details.
This operator simply checks if a variable contains a float or not. The operator returns true if the input or the first parameter is a float. If both input and parameter are supplied, it is the parameter that will be evaluated.
{let my_variable=256 your_variable=13.5} {$your_variable|is_float( $my_variabe )} {/let}
The example above returns false.
{let my_variable=256 your_variable=13.5} {$my_variable|is_float( $your_variabe )} {/let}
The example above returns true.
log in or create a user account to comment.
Comments