String Functions
Provides deterministic, text-centric utility functions for AiSQL. Functions operate on strings in a rule-safe, side-effect-free manner and return numeric or boolean values suitable for inference. No probabilistic or generative language processing is performed.
| Name | Parameters | Returns | Description |
| String.ContainsText | (string value, string search) | bool | Returns true if the text contains the specified value. |
| String.EndsWithText | (string value, string search) | bool | Returns true if the text ends with the specified value. |
| String.EqualsIgnoreCase | (string left, string right) | bool | Returns true if the texts are equal ignoring case. |
| String.EqualsText | (string left, string right) | bool | Returns true if the texts are exactly equal. |
| String.IsEmpty | (string value) | bool | Returns true if the text is empty. |
| String.IsNullOrEmpty | (string value) | bool | Returns true if the text is null or empty. |
| String.LengthOf | (string value) | decimal | Returns the length of the text. |
| String.StartsWithText | (string value, string search) | bool | Returns true if the text starts with the specified value. |
| String.SubstringFrom | (string value, decimal startIndex) | string | Returns a substring starting at the specified index. |
| String.SubstringRange | (string value, decimal startIndex, decimal length) | string | Returns a substring from the specified start index and length. |
| String.ToLowerCase | (string value) | string | Converts the text to lowercase. |
| String.ToUpperCase | (string value) | string | Converts the text to uppercase. |
| String.Trim | (string value) | string | Trims whitespace from both ends of the text. |
Examples
RULE CustomerIntent
IF
String.CONTAINS(UserMessage, 'refund') < 3
THEN
ACTION = 'EscalateSupport'