From: Eric De Mund <ead@ixian.com>
To: zsh-users@zsh.org
Cc: nix@myproxylists.com
Subject: Re: How to capitalize last character of a string?
Date: Tue, 26 Oct 2010 13:49:51 -0700 [thread overview]
Message-ID: <19655.16111.999209.381824@ixian.com> (raw)
In-Reply-To: <a695c10a88b7d75ca26ac49f3bd7c5c6.squirrel@gameframe.net>
nix,
nix@myproxylists.com writes:
] Subject: How to capitalize last character of a string?
] Hi, as the subject says, any guidance?
]
] TEST="word"
]
] print "${(C)TEST[1]}$TEST[2,-1]"
]
] Capitalizes the first character but somehow I could not come up with
] solution other way.
I'm not familiar with the syntax, but inferred the following. It seems
to work:
% TEST="word"
% print "$TEST[1,-2]${(C)TEST[-1]}"
worD
%
Regards,
Eric
--
Eric De Mund
ead@ixian.com
next prev parent reply other threads:[~2010-10-26 21:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 20:27 nix
2010-10-26 20:49 ` Eric De Mund [this message]
2010-10-26 21:42 ` nix
2010-10-26 21:56 ` Linus Arver
-- strict thread matches above, loose matches on Subject: below --
2010-10-26 11:42 nix
2010-10-26 11:56 ` András Nemes
2010-10-26 13:08 ` Mikael Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19655.16111.999209.381824@ixian.com \
--to=ead@ixian.com \
--cc=nix@myproxylists.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).