Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
changing case to Title Case
- X-seq: zsh-users 17082
- From: TJ Luoma <luomat@xxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: changing case to Title Case
- Date: Mon, 14 May 2012 15:30:49 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:subject:x-mailer:mime-version:content-type :content-transfer-encoding:content-disposition; bh=Wyos8osi5lOjhLiZywh6TSbKkA5JsbOrBF4DuVFDeno=; b=K7u+Pl1bQw5PqBtd1sgMkGST7DvX/IB7zHdp/PMY7xEQdXDfDho9X5SZ3wI6FvN1Ca 2o6iw9Wi0VLp97gvuFt2u78Ttjm9ODs0AmbJdj4s4E6RM/Fsq2GxUwEF6cdE93tKA0xY v+7NYSYQ6+QeNGuxc8341p28T/0F08auyeM6ceuvBuDEZ2ESbaNZg1LjrLy4pNAUiib2 WRw75sUOo5voRdTxgW/Humz0/7sm2yYFfEREhj9H7cpwbbR6uG9atdZdrpQ04rlIcneY lujRj4hla4Doxnbb5p8yOpw6Se7r1EfDmo+K2Qtx37+bc/Mu197HQSb9NjNpLaTvRpNj sJ8g==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
$ foo="ONE TWO thRee FoUR"
$ print -r -- "${(C)foo}"
will output this:
One Two Three Four
but this:
$ foo="ONE TWO thRee FoUR's"
$ print -r -- "${(C)foo}"
will give this:
One Two Three Four'S
Note the S is capitalized
$ foo="ONE TWO thRee FoUR's.pdf"
$ print -r -- "${(C)foo}"
will give this:
One Two Three Four'S.Pdf
Note that the P in PDF and the S after ' are capitalized.
Is there any way to avoid that?
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author