@@ -45,15 +45,14 @@ Examples:
4545
4646=head2 method contains
4747
48- multi method contains(Str:D $:: Str:D $needle --> Bool)
49- multi method contains(Str:D $:: Str:D $needle, Int:D $pos --> Bool)
50- multi method contains(Str:D $:: Str:D $needle, :m(:$ignoremark)! --> Bool)
51- multi method contains(Str:D $:: Str:D $needle, :i(:$ignorecase)!, :m(:$ignoremark) --> Bool)
52- multi method contains(Str:D $:: Str:D $needle, Int:D $pos, :m(:$ignoremark)! --> Bool)
53- multi method contains(Str:D $:: Str:D $needle, Int:D $pos, :i(:$ignorecase)!, :m(:$ignoremark) --> Bool)
54- multi method contains(Str:D $:: Regex:D $needle --> Bool)
55- multi method contains(Str:D $:: Regex:D $needle, Int:D $pos --> Bool)
56-
48+ multi method contains(Str:D: Str:D $needle --> Bool)
49+ multi method contains(Str:D: Str:D $needle, Int:D $pos --> Bool)
50+ multi method contains(Str:D: Str:D $needle, :m(:$ignoremark)! --> Bool)
51+ multi method contains(Str:D: Str:D $needle, :i(:$ignorecase)!, :m(:$ignoremark) --> Bool)
52+ multi method contains(Str:D: Str:D $needle, Int:D $pos, :m(:$ignoremark)! --> Bool)
53+ multi method contains(Str:D: Str:D $needle, Int:D $pos, :i(:$ignorecase)!, :m(:$ignoremark) --> Bool)
54+ multi method contains(Str:D: Regex:D $needle --> Bool)
55+ multi method contains(Str:D: Regex:D $needle, Int:D $pos --> Bool)
5756
5857Given a C<Str> invocant (known as the I<haystack>) and a first argument
5958(known as the C<$needle>), it searches for the C<$needle> in the I<haystack>
@@ -78,7 +77,7 @@ Similarly, C<$pos> can be of type C<Cool>, which will be coerced to C<Int>.
7877(Technically, these cases will take a detour over L<C<Cool.contains>|/type/Cool#method_contains>,
7978which does the coercions and then calls C<Str.contains>.)
8079
81- say "Hello, 12345".contains(5, "10.0"); # OUTPUT: «True»
80+ say "Hello, 12345".contains(5, "10.0"); # OUTPUT: «True»
8281
8382Since Rakudo release 2020.02, the C<$needle> can also be
8483a L<C<Regex>|/type/Regex> in which case the C<contains> method
0 commit comments