In Cool§

See primary documentation in context for routine trim-leading

sub trim-leading(Str(Cool))
method trim-leading()

Coerces the invocant (or in sub form, its argument) to Str, and returns the string with leading whitespace stripped.

my $stripped = '  abc '.trim-leading;
say "<$stripped>";          # OUTPUT: «<abc >␤»

In Str§

See primary documentation in context for method trim-leading

method trim-leading(Str:D: --> Str)

Removes the whitespace characters from the beginning of a string. See also trim.

In Allomorph§

See primary documentation in context for method trim-leading

method trim-leading(Allomorph:D:)

Calls Str.trim-leading on the invocant's Str value.