Text predicates
Reference documentation for Expressif predicates in the text scope.
| Name | Overview |
|---|---|
contains | Returns true if the value passed as argument contains, anywhere in the string, the text value passed as parameter. Returns false otherwise. |
ends-with | Returns true if the value passed as argument ends with the text value passed as parameter. Returns false otherwise. |
is-any-of | Returns true if the list of text values passed as parameter contains the text value passed as argument. Returns false otherwise. |
is-camel-case | Returns true when the complete input is a camel-case identifier beginning with a letter. The initial letter is lowercase; subsequent Unicode letters, combining marks, and numbers may include uppercase acronym runs, as in httpServerURL. Returns false for null, empty, blank, punctuation, mixed separators, and leading, trailing, or repeated separators. |
is-currency-symbol | Returns true when the input contains exactly one Unicode currency symbol. Returns false for null, empty, blank, and all other text. |
is-empty | Returns true if argument value has a length of 0. Return false otherwise. |
is-empty-or-null | Returns true if argument value has a length of 0 or is null. Return false otherwise. |
is-equivalent-to | Compare the text value passed as argument and the text value passed as parameter and returns true if they are equal. By default the comparison is agnostic of the culture and case-insensitive. |
is-kebab-case | Returns true when the complete input is a kebab-case identifier beginning with a letter. Words contain lowercase or uncased Unicode letters, combining marks, and numbers, separated by single hyphens. Returns false for null, empty, blank, punctuation, mixed separators, and leading, trailing, or repeated separators. |
is-lower-case | Returns true if all characters of the text value passed as argument are lower-case. The value null, empty and whitespace also returns true. Returns false otherwise. |
is-pascal-case | Returns true when the complete input is a pascal-case identifier beginning with a letter. The initial letter is uppercase or titlecase; subsequent Unicode letters, combining marks, and numbers may include uppercase acronym runs, as in HTTPServer. Returns false for null, empty, blank, punctuation, mixed separators, and leading, trailing, or repeated separators. |
is-snake-case | Returns true when the complete input is a snake-case identifier beginning with a letter. Words contain lowercase or uncased Unicode letters, combining marks, and numbers, separated by single underscores. Returns false for null, empty, blank, punctuation, mixed separators, and leading, trailing, or repeated separators. |
is-sorted-after | Compare the text value passed as argument and the text value passed as parameter and returns true if argument value is alphabetically sorted after the parameter value. By default the comparison is agnostic of the culture and case-insensitive. |
is-sorted-after-or-equivalent-to | Compare the text value passed as argument and the text value passed as parameter and returns true if argument value is alphabetically sorted after the parameter value or if the two values are equal. By default the comparison is agnostic of the culture and case-insensitive. |
is-sorted-before | Compare the text value passed as argument and the text value passed as parameter and returns true if argument value is alphabetically sorted before the parameter value. By default the comparison is agnostic of the culture and case-insensitive. |
is-sorted-before-or-equivalent-to | Compare the text value passed as argument and the text value passed as parameter and returns true if argument value is alphabetically sorted before the parameter value or if the two values are equal. By default the comparison is agnostic of the culture and case-insensitive. |
is-upper-case | Returns true if all characters of the text value passed as argument are upper-case. The value null, empty and whitespace also returns true. Returns false otherwise. |
matches-currency | Returns true when the trimmed input is an amount with one Unicode currency symbol at the beginning or end, optional comma grouping, and an optional dot decimal fraction. Returns false for null, empty, blank, and malformed amounts. |
matches-date | Returns true if the text value passed as argument is a valid representation of a date in the culture specified as parameter. If the value is of type DateTime and the time part is set to midnight then it returns true. If the value is of type Date. Returns false otherwise. |
matches-datetime | Returns true if the text value passed as argument is a valid representation of a dateTime in the culture specified as parameter. The expected format is the concatenation of the ShortDatePattern, a space and the LongTimePattern. If the value is of type DateTime, it returns true. Returns false otherwise. |
matches-numeric | Returns true if the text value passed as argument is a valid representation of a numeric in the culture specified as parameter. Returns false otherwise. |
matches-regex | Returns true if the value passed as argument validate the regex passed as parameter. Returns false otherwise. |
matches-time | Returns true if the text value passed as argument is a valid representation of a time in the culture specified as parameter. The expected format is the LongTimePattern. If the value is of type TimeOnly, it returns true. Returns false otherwise. |
starts-with | Returns true if the value passed as argument starts with the text value passed as parameter. Returns false otherwise. |