Name
is — Checks whether a value is of a certain type
Synopsis
boolean
is
( |
any
value
, |
|
type
type
) ; |
Parameters
-
any
value
a value whose type is checked
-
type
type
type to check
Usage
any ui = UI::UserInput();
if (is (ui, string)) {
foo ("Hello, " + (string) ui);
}
else if (is (ui, symbol)) {
bar ((symbol) ui);
}