module documentation
Contains routines for casting to and from types. Generally useful for simple data marshalling to and from text
| Exception | |
If casts fail, throw this exception |
| Function | to |
Casts an object to a type |
| Function | to |
Casts and object to any of the given types. |
Casts an object to a type
| Parameters | |
x:Any | any Object to cast |
atype:type | type type to cast to |
| Returns | |
type | x casted to atype, throws CastException on failure. |
Casts and object to any of the given types.
| Parameters | |
x:Any | Any Object to cast |
types:Iterable[ | Iterable[type] Iterable (e.g., list) of the types to attempt to cast to. Once one cast succeeds, the others are not attempted. |
| Returns | |
Any | x casted to the first type that succeeds. Throws CastException on failure. |