We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ea3658 commit cbfb05cCopy full SHA for cbfb05c
doc/Type/Str.pod
@@ -392,6 +392,16 @@ Returns True if the invocant is identical to or ends with C<$needle>.
392
say "Hello, World".ends-with('Hello'); # False
393
say "Hello, World".ends-with('ld'); # True
394
395
+=head2 method contains
396
+
397
+ multi method contains(Str:D: Str(Cool) $needle) returns True:D
398
399
+Returns True if the invocant contains the C<$needle> at any position within
400
+the string.
401
402
+ say "Hello, World".contains('hello'); # False
403
+ say "Hello, World".contains(','); # True
404
405
=head2 method subst
406
407
multi method subst(Str:D: $matcher, $replacement, *%opts)
0 commit comments