Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Title Case a Textified String



On 11/03/2010 14.50, Radoulov, Dimitre wrote:
On 11/03/2010 14.45, Mikael Magnusson wrote:
On 11 March 2010 14:36, Radoulov, Dimitre<cichomitiko@xxxxxxxxx>  wrote:
On 11/03/2010 13.43, zzapper wrote:
Hi
I want to convert a textified string to a Title Case Phrase

eg
fred-goat-dog.jpg to Fred Goat Dog

% print ${${(Cs:-:):-fred-goat-dog.jpg}%.*}
Fred Goat Dog
Okay, yours has the most smileys, so I guess you win this round.

When I read yours, I though it would have been better to wait (not to post) :)
 I prefer your version (both r and // seem cleaner to me).
                                                ^^^

I mean :gs, not //.



Dimitre




Messages sorted by: Reverse Date, Date, Thread, Author