I'm declining this patch in favor of a slightly shorter version taken almost directly from the synopsis:
our Str multi method capitalize() is export { self.lc.subst(/\w+/, { .ucfirst }, :global) } Just for reference (and for consideration in other upcoming patches) -- the patch and the original code it was based on had a few issues: (1) The synopsis says that the conversion takes place on word characters; the original code was considering only alphabetics. (2) Methods that don't accept additional positional parameters really should have an explicit empty parameter list, as shown above. (3) Case conversions on a string *can* cause its length to change -- in particular, the character "ß" (U+00DF) becomes "SS" when converted to uppercase. (I'm not sure that we have any tests for this at present, and it probably doesn't work when ICU isn't present.) Thanks for the patch! Pm