Navigation
Synopsis Check that a string contains another string.
Function bool contains(str input, str find)
Usage import String;
Description Check whether the string find occurs as substring in the string subject.
Examples
rascal>import String;
ok
rascal>contains("abracadabra", "bra");
bool: true
rascal>contains("abracadabra", "e");
bool: false
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.