usage-name
ErrorsCollection

usage-name

Synthesised documentation from type/Parameter

From type/Parameter

See Original text in context

method usage-name(Parameter:D: --> Str:D)

Returns the parameter name without any sigils and twigils.

If the parameter is anonymous, an empty string will be returned.

Note: Before Rakudo version 2020.08 the return value for an anonymous parameter was Nil.

my Signature $sig = :(Str $xStr @*lBool);
say $sig.params[0].usage-name;           # OUTPUT: «x␤» 
say $sig.params[1].usage-name;           # OUTPUT: «l␤» 
say $sig.params[2].usage-name;           # OUTPUT: «␤»