INCLUDES
SourceINCLUDES checks whether a container includes a given value.
| Argument | Type | Default value | Description |
haystack |
String Any[] Object Iterable |
The value container. | |
needle |
Any |
The target value to assert. |
Returns Boolean A boolean value that indicates whether a container contains a given value.
COUNT
SourceCOUNT returns the number of elements in a collection.
| Argument | Type | Default value | Description |
collection |
Collection |
The collection to count. |
Returns Int The number of elements in the collection.
COUNT_DISTINCT
SourceCOUNT_DISTINCT computes the number of distinct elements in the given collection and returns the count as an integer.
| Argument | Type | Default value | Description |
collection |
Collection |
The collection to count distinct elements in. |
Returns Int The number of distinct elements in the collection.
LENGTH
LENGTH returns the number of elements or characters in a value.
| Argument | Type | Default value | Description |
value |
String Any[] Object Binary |
The value to measure. |
Returns Int The length of the value — number of characters for strings, number of elements for arrays and objects, number of bytes for binary values.
REVERSE
SourceREVERSE returns the reverse of a given string or array value.
| Argument | Type | Default value | Description |
value |
String Any[] |
The string or array to reverse. |
Returns String Any[] A reversed version of a given value.