include?(p1)
public
Returns true if str contains the given string or character.
"hello".include? "lo"
"hello".include? "ol"
"hello".include? ?h
Show source
static VALUE
rb_str_include(VALUE str, VALUE arg)
{
long i;
StringValue(arg);
i = rb_str_index(str, arg, 0);
if (i == -1) return Qfalse;
return Qtrue;
}