samemark
ErrorsCollection

samemark

Synthesised documentation from type/Allomorph type/Str

From type/Allomorph

See Original text in context

method samemark(Allomorph:D: |c)

Calls Str.samemark on the invocant's Str value.

From type/Str

See Original text in context

multi sub samemark(Str:D $stringStr:D $pattern --> Str:D)
method    samemark(Str:D: Str:D $pattern --> Str:D)

Returns a copy of $string with the mark/accent information for each character changed such that it matches the mark/accent of the corresponding character in $pattern. If $string is longer than $pattern, the remaining characters in $string receive the same mark/accent as the last character in $pattern. If $pattern is empty no changes will be made.

Examples:

say 'åäö'.samemark('aäo');                        # OUTPUT: «aäo␤» 
say 'åäö'.samemark('a');                          # OUTPUT: «aao␤» 
 
say samemark('Räku''a');                        # OUTPUT: «Raku␤» 
say samemark('aöä''');                          # OUTPUT: «aöä␤»