method starts-with
Documentation for method starts-with
assembled from the following types:
class Str
From Str
(Str) method starts-with
multi method starts-with(Str: Str(Cool) --> Bool)
Returns True
if the invocant is identical to or starts with $needle
.
say "Hello, World".starts-with("Hello"); # OUTPUT: «True»say "https://perl6.org/".starts-with('ftp'); # OUTPUT: «False»