For more information... RTFM!
NAVIGATION
RECENTLY VIEWED
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

namecase

Namecases the text. 

Example

This filter only works with words that have an upper-cased first letter.

[filter namecase]LEONARDO da Vinci[/filter]

Results in:

Leonardo da Vinci

Note that the second word (da) didn't start with an upper-cased first letter.

Source code

sub {
    use locale;
    my $val = shift;
    $val =~ s/([A-Z]\w+)/\L\u$1/g;
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Saturday 17 June 2006 at 4:31 PM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us