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:D: Str(Cool$needle --> Bool:D)

Returns True if the invocant is identical to or starts with $needle.

say "Hello, World".starts-with("Hello");     # OUTPUT: «True␤» 
say "https://raku.org/".starts-with('ftp');  # OUTPUT: «False␤»