contains

# given 'Nullam ultrices placerat nibh vel malesuada.'

$string->contains('trices'); # 1; true
$string->contains('itrices'); # 0; false

$string->contains(qr/trices/); # 1; true
$string->contains(qr/itrices/); # 0; false

The contains method searches the string for the string specified in the argument and returns true if found, otherwise returns false. If the argument is a string, the search will be performed using the core index function. If the argument is a regular expression reference, the search will be performed using the regular expression engine. This method returns a Data::Object::Number object.

contains(Str | RegexpRef $arg1) : NumObject

method

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 10:

Unknown directive: =name

Around line 14:

Unknown directive: =usage

Around line 24:

Unknown directive: =description

Around line 33:

Unknown directive: =signature

Around line 37:

Unknown directive: =type