Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to capitalize last character of a string?
- X-seq: zsh-users 15489
- From: AndrÃs Nemes <andras.nemes@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: How to capitalize last character of a string?
- Date: Tue, 26 Oct 2010 22:56:09 +1100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=UQ/3olBgTPO3rsu9gRYeeQ2nG7EmQzBJvniXJfWPChw=; b=mGI9kQ8q22muu6GtfmioqAd8BlH8ShFZuKB5diTs1TuRj0bZ/gCOg8gDgfP4SLzbOw chMaBOzazypiVR2FViPe3wyoR5pEt7mdZjgLV4piEAv5u5jPiNt/mIia7ObnCkG+d+9Z zuGpijlS8n6nUhAes/FmqPMW/sWyh33L4Dhm0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=W6JH+V6rehkU2UiB6jPQNMkt5TPe6TmYd927JjO4G7iSZCpf15RF3MGI74W9ypX4kJ 2mtElv4TUfPkpVPNdceZzBKRJYp5OlhQ/+1aqeMkdKYV/ocGEpMCyRUGFB+gG46d9uTS kvV/K/O2/AjTfa55Ynv+qHkbasUs7ZDStadZ0=
- In-reply-to: <fe16f67c3c15aacfd6854935cee68e1f.squirrel@xxxxxxxxxxxxx>
- 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
- References: <fe16f67c3c15aacfd6854935cee68e1f.squirrel@xxxxxxxxxxxxx>
nearly there.
print "$TEST[1,-2]${(C)TEST[-1]}"
On Tue, Oct 26, 2010 at 10:42 PM, <nix@xxxxxxxxxxxxxxxx> wrote:
> 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.
>
>
>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author