Returns true if the given string contains the given substring.

Syntax

Smartsite SXML CopyCode image Copy Code
boolean string.contains(string data, string searchFor)
boolean string.contains(string data, string searchFor, boolean caseSensitive)
boolean string.contains(string data, string searchFor, string delimiter)
boolean string.contains(string data, string searchFor, string delimiter, boolean caseSensitive)

Parameters

Name Data Type Description
data String The input string.
searchFor String The string to search for.
caseSensitive Boolean If set to true a case sensitive search is performed.
delimiter String The delimiter.

Return Value

Data Type Description
Boolean True if the input string provided contains the specified search string; otherwise, false.

Expand image Examples

SXML