On Sun, Apr 30, 2000 at 11:41:07AM -0600, Tom Christiansen wrote: > >:>l179: \u titlecase next char > >:>Not sure what 'titlecase' means, or why it is more accurate than > >:>'uppercase', nor why \U was not similarly changed. Is there some special meaning to "titlecase next char" as opposed to titlecasing a word, or is it redundant to specify "char"? If I use \u in the middle of a word, am I still titlecasing the next character? > >:Because that doesn't happen there. "titlecase" is a Unicode notion. > >:(It's somewhat misleading, since it doesn't really understand proper > >:titlecasing rules in English.) But some scripts (read: charsets) > >:allegedly distinguish between these. That's why toke.c has > >:toUPPER_LC_uni for uc(), but toTITLE_LC_uni for ucfirst(). > > >I think that's worth expanding on then: taking myself as the > >epitome of the man on the Clapham omnibus, the reader will not > >know what this word means until it is explained. > > Well, it's in here: > > =item uc > > Returns an uppercased version of EXPR. This is the internal > function implementing the C<\U> escape in double-quoted strings. > Respects current LC_CTYPE locale if C<use locale> in force. > See L<perllocale>. Under Unicode (C<use utf8>) it uses the > standard Unicode uppercase mappings. (It does not attempt to > do titlecase mapping on initial letters. See C<ucfirst> for > that.) ucfirst doesn't do titlecase mapping on initial letters either. It just converts the first character in a string to uppercase. > =item ucfirst > > Returns the value of EXPR with the first character in uppercase > (titlecase in Unicode). This is the internal function implementing > the C<\u> escape in double-quoted strings. Respects current > LC_CTYPE locale if C<use locale> in force. See L<perllocale> > and L<utf8>. > > Do you not like that? Is titlecase converting the first character in a string to uppercase, or converting the first letter of each word in a string to uppercase? RonaldThread Previous | Thread Next