Documentation for routine trim-trailing
Documentation for routine trim-trailing, assembled from the following types:
class Cool
From Cool
routine trim-trailing
Defined as:
sub trim-trailing(Str(Cool))
method trim-trailing()
Usage:
trim-trailing STRING
STRING.trim-trailing
Coerces the invocant (or in sub form, its argument) to Str, and returns the string with trailing whitespace stripped.
my $stripped = ' abc '.trim-trailing;
say "<$stripped>"; # < abc>
class Str
From Str
method trim-trailing
Remove the whitespace characters from the end of a string. See also trim.


Perl 6 Documentation