The tc routine

Combined from primary sources listed below.

In class Str ( Type/Str )§

See primary docmentation in context for routine tc.

routine tc§

multi        tc(Str:D  --> Str:D)
multi method tc(Str:D: --> Str:D)

Does a Unicode "titlecase" operation, that is changes the first character in the string to titlecase, or to uppercase if the character has no titlecase mapping.

In class Cool ( Type/Cool )§

See primary docmentation in context for routine tc.

routine tc§

sub tc(Str(Cool))
method tc()

Coerces the invocant (or in sub form, its argument) to Str, and returns it with the first letter case-folded to titlecase (or where not available, uppercase).

say "abC".tc;       # OUTPUT: «AbC␤»

In class Allomorph ( Type/Allomorph )§

See primary docmentation in context for method tc.

method tc§

method tc(Allomorph:D:)

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