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

Re: How to capitalize last character of a string?



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