method ends-with
1 | class Str |
1.1 | (Str) method ends-with |
Documentation for method ends-with
assembled from the following types:
class Str
From Str
(Str) method ends-with
multi method ends-with(Str: Str(Cool) --> Bool)
Returns True
if the invocant is identical to or ends with $needle
.
say "Hello, World".ends-with('Hello'); # OUTPUT: «False»say "Hello, World".ends-with('ld'); # OUTPUT: «True»