Friday, April 29, 2011

is there s 'toinitialupper' function?

I'm writing a script where I want to capitalise the first letter of a word. I know hat 'toupper' will change lower-to-upper case on the whole string, like \U in a :s command, but is there an equivalent of \u (convert the initial character only?)

I know that I can do it by jiggering around with strpart() and len(), but I hoped that it might be simpler than that.

looking for 'initial' and 'leading in helpgrep yielded too many hits to easily scan.

TIA.

Regards, Andy
--
Andrew Long
andrew dot long at mac dot com

No comments:

Post a Comment