Re: is there s 'toinitialupper' function?

2011-04-30 Thread Andrew Long
On 30 Apr 2011, at 00:47, John Beckett wrote: Tim Chase wrote: let s=substitute(s, '\w\+', '\u\1', 'g') The above is intended to change each word in s, making the first letter uppercase and not changing the rest. The search pattern needs brackets, or the \1 should be replaced. The

Re: is there s 'toinitialupper' function?

2011-04-30 Thread Bee
On Apr 29, 4:47 pm, John Beckett johnb.beck...@gmail.com wrote: Tim Chase wrote:   let s=substitute(s, '\w\+', '\u\1', 'g') The above is intended to change each word in s, making the first letter uppercase and not changing the rest. The search pattern needs brackets, or the \1 should be

Re: is there s 'toinitialupper' function?

2011-04-30 Thread Tim Chase
On 04/30/2011 10:39 AM, Bee wrote: On Apr 29, 4:47 pm, John Beckettjohnb.beck...@gmail.com wrote: Tim Chase wrote: let s=substitute(s, '\w\+', '\u\1', 'g') The above is intended to change each word in s, making the first letter uppercase and not changing the rest. The search pattern

Re: is there s 'toinitialupper' function?

2011-04-30 Thread Bee
On Apr 30, 9:36 am, Tim Chase v...@tim.thechases.com wrote: On 04/30/2011 10:39 AM, Bee wrote: On Apr 29, 4:47 pm, John Beckettjohnb.beck...@gmail.com  wrote: Tim Chase wrote:    let s=substitute(s, '\w\+', '\u\1', 'g') The above is intended to change each word in s, making the first

is there s 'toinitialupper' function?

2011-04-29 Thread Andrew Long
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

Re: is there s 'toinitialupper' function?

2011-04-29 Thread Tim Chase
On 04/29/2011 11:55 AM, Andrew Long wrote: 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

RE: is there s 'toinitialupper' function?

2011-04-29 Thread John Beckett
Tim Chase wrote: let s=substitute(s, '\w\+', '\u\1', 'g') The above is intended to change each word in s, making the first letter uppercase and not changing the rest. The search pattern needs brackets, or the \1 should be replaced. The following works: let s=substitute(s, '\w\+', '\u',