Reference > Rule Languages > Business Action Language > BAL Operators > Text Operators

Text operators perform tests on strings.

Table 6 Text Operators in BAL
Operator 
Description 
Example 
<text> contains <text> 
Tests that a string contains another string. 
if 
the name of the customer contains "Smith" 
then... 
<text> does not contain <text> 
Tests that a string does not contain another string. 
if 
the name of the customer does not contain "Smith" 
then... 
<text> does not end with <text> 
Tests that a string does not end with another string. 
if 
the rental agreement code of the customer does not end with "XG5" 
then... 
<text> does not start with <text> 
Tests that a string does not start with another string. 
if 
the rental agreement code of the customer does not start with "XG5" 
then... 
<text> ends with <text> 
Tests that a string ends with another string. 
if 
the rental agreement code of the customer ends with "XG5" 
then... 
<text> is empty 
Tests that a string is empty. An empty string contains no characters and is equivalent to "". A string is not empty if it contains a space (" ") 
if 
the rental agreement code of the customer is empty 
then... 
<text> is not empty 
Tests that a string is not empty. A string is not empty if it contains a space (" ") 
if 
the rental agreement code of the customer is not empty 
then... 
print <text> 
Prints a string to standard out. 
if... 
then 
print the message "Hello World"  
<text> starts with <text> 
Tests that a string starts with another string. 
if 
the rental agreement code of the customer starts with "XG5" 
then... 
the length of <text> 
Returns the number of characters in a string. 
if 
the length of 'customer name' is more than 3 
then... 

Related Concepts

Business Rules
Decision Tables
Decision Trees

Related Tasks

Creating Business Rules
Working With Decision Tables
Working With Decision Trees

Related Reference

BAL Operators
Date Operators
Number Operators
Object Operators

Related Samples and Tutorials

Tutorial: Creating Business Rules