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

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␤»