skip to main content
Corticon Studio: Rule Language Guide : Categories of rule operators : Attribute operators : String
 

Try Corticon Now
String
Corticon's String attribute operators are as follows:
Name and Syntax
Returns
Description
Equals (used as a comparison)
<String1> = <String2>
Boolean
Returns a value of true if <String1> exactly matches <String2>. Both case and length are examined to determine equality. See Character precedence: Unicode and Java Collator for character precedence.
Equals (used as an assignment)
<String1> = <String2>
String
Assigns the value of <String2> to the value of <String1>.
<String1> <> <String2>
Boolean
Returns a value of true if <String1> is not equal to <String2>.
<String1> < <String2>
Boolean
Returns a value of true if <String1> is less than <String2>. See Character precedence: Unicode and Java Collator for character precedence.
<String1> > <String2>
Boolean
Returns a value of true if <String1> is greater than <String2>. See Character precedence: Unicode and Java Collator for character precedence.
<String1> <= <String2>
Boolean
Returns a value of true if <String1> is less than or equal to <String2>. See Character precedence: Unicode and Java Collator for character precedence.
<String1> >= <String2>
Boolean
Returns a value of true if <String1> is greater than or equal to <String2>. See Character precedence: Unicode and Java Collator for character precedence.
attributeReference in [ |(rangeExpression)|]
Boolean
Returns a value of true if attributeReference is in the range of String values from..to, and where opening and closing parentheses ( )indicate exclusion of that limit and square brackets [ ] indicate inclusion of that limit.
attributeReference in {listExpression}
Boolean
Returns a value of true if attributeReference is in the comma-delimited list of literal values, defined enumeration values, or - if in use - enumeration labels.
<String1> + <String2>
String
Concatenates <String1> to <String2>. Alternative syntax.
<String>.size
String
Returns the number of characters in <String>.
<String1>.concat(<String2>)
String
Concatenates <String1> to <String2>.
<String>.toUpper
String
Converts all characters <String> to uppercase.
<String>.toLower
String
Converts all characters in <String> to lowercase.
<String>.toDateTime
DateTime
Converts the value in <String> to data type DateTime ONLY if all characters in <String> correspond to a valid DateTime mask (format)
<String>.toDecimal
Decimal
Converts an attribute of type String to data type Decimal ONLY if all characters in <String> are numeric and contain not more than one decimal point. If any non-numeric characters are present (other than a single decimal point or leading minus sign), no value is returned.
<String>.toInteger
Integer
Converts an attribute of type String to type Integer ONLY if all characters in <String> are numeric. If any non-numeric characters are present, no value is returned.
<String>.substring (<Integer1>,<Integer2>)
String
Returns that portion of <String> between character positions <Integer1> and Integer2>.
<String1>.equalsIgnoreCase (<String2>)
Boolean
Returns a value of true if <String1> is the same as <String2>, irrespective of case.
<String1>.startsWith (<String2>)
Boolean
Returns a value of true if the <String1> begins with the characters specified in <String2>.
<String1>.endsWith (<String2>)
Boolean
Evaluates the contents of <String1> and returns a value of true if the String ends with the characters specified in <String2>.
<String1>.contains (<String2>)
Boolean
Evaluates the contents of <String1> and returns a value of true if it contains the exact characters defined by <String2>
<String1>.equals (<String2>)
Boolean
Returns a value of true if <String1> is the same as <String2>.
<String1>.indexOf (<String2)
Integer
Returns the beginning character position number of <String2> within <String1>, if <String1> contains <String2>. If it does not, the function returns a value of zero.
containsBlanks
<String>.containsBlanks
Boolean
Determines whether the specified String contains any blanks.
characterAt(index)
<String>.characterAt(index:Integer)
String
Returns the character at the specified position in the String.
isInteger
<String>.isInteger
Boolean
Determines whether "this" String contains only integer digits.
Note: This operator examines each character in a string to determine whether it is in the range 0 to 9. Therefore, the operator returns true when the entire string evaluates as a positive integer, and false when a minus sign is the first character of a string that would evaluate as a negative integer. A new extended operator could be created if the string as a whole is to be evaluated as true whether positive or negative (for example, by allowing the first character to be a minus sign.)
trimSpaces
<String>.trimSpaces
String
Trims leading and trailing spaces from "this" String.
charsIn(validSet)
<String>.charsIn(validSet:String)
Boolean
Determines whether "this" String contains only characters specified in the validSet.