Utils Class Reference
[Utility]
Description
Provides utility functions used by element helpers
Static Functions
- bool is_string( varying val)
- Returns true if val is a string, false otherwise. More...
- Element strings_to_elements( String|String[] elements, Function constructor_function, bool force_array)
- Converts the string or array of strings in elements to Elements. More...
- String uuid()
- Generates a version 4 UUID in canonical textual format. More...
Functions
- bool Utils.is_string( varying val) [static]
-
Returns true if val is a string, false otherwise.
Parameters
- val
- the value to test
- Element Utils.strings_to_elements( String|String[] elements, Function constructor_function, bool force_array) [static]
-
Converts the string or array of strings in elements to Elements.
Parameters
- elements
- string or array of strings of the element names
- constructor_function
- constructor to use when creating elements
- force_array
- if truthy then always return an array of elements even if passed in a string. Ignored if elements is an array.
Returns
the created Element or array of Elements.
- String Utils.uuid() [static]
-
Generates a version 4 UUID in canonical textual format.
Returns
the generated UUID.