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.

NameParametersReturnsDescription
String.ContainsText(string value, string search)boolReturns true if the text contains the specified value.
String.EndsWithText(string value, string search)boolReturns true if the text ends with the specified value.
String.EqualsIgnoreCase(string left, string right)boolReturns true if the texts are equal ignoring case.
String.EqualsText(string left, string right)boolReturns true if the texts are exactly equal.
String.IsEmpty(string value)boolReturns true if the text is empty.
String.IsNullOrEmpty(string value)boolReturns true if the text is null or empty.
String.LengthOf(string value)decimalReturns the length of the text.
String.StartsWithText(string value, string search)boolReturns true if the text starts with the specified value.
String.SubstringFrom(string value, decimal startIndex)stringReturns a substring starting at the specified index.
String.SubstringRange(string value, decimal startIndex, decimal length)stringReturns a substring from the specified start index and length.
String.ToLowerCase(string value)stringConverts the text to lowercase.
String.ToUpperCase(string value)stringConverts the text to uppercase.
String.Trim(string value)stringTrims whitespace from both ends of the text.

Examples

	
RULE CustomerIntent
    IF
        String.CONTAINS(UserMessage, 'refund')  < 3
    THEN
        ACTION = 'EscalateSupport'