Smartsite SXML CopyCode image Copy Code
{buffer.set(data, 'The rain in Spain falls mainly in the plain')}

{string.contains($data, ain, '')} => true
{string.contains($data, AIN, '')} => false
{string.contains($data, AIN, '', false)} => false
{string.contains($data, AIN, '', true)} => false

<!-- find the string rain enclosed in spaces -->
{string.contains($data, rain, ' ')} => true

<!-- find the string 23 enclosed in comma -->
{string.contains('23,67,13,34', 23, ',')} => true

<!-- find the string 24 enclosed in comma -->
{string.contains('23,67,13,34', 24, ',')} => false
Example Result CopyCode image Copy Code
true => true
true => false
true => false
false => false

<!-- find the string rain enclosed in spaces -->
true => true

<!-- find the string 23 enclosed in comma -->
true => true

<!-- find the string 24 enclosed in comma -->
false => false
SXML