Date: Mar 19, 2013 12:04 AM
Author: Bob Hanlon
Subject: Re: Swap lowercase and uppercase letters

str = "hELLO THERE!";

For a string of this form

StringReplacePart[
ToLowerCase[str],
ToUpperCase[StringTake[str, 1]],
1]

"Hello there!"

For this specific string

StringReplace[
ToLowerCase[str],
"h" -> "H", 1]

"Hello there!"


Bob Hanlon


On Mon, Mar 18, 2013 at 5:35 AM, Bill <WDWNORWALK@aol.com> wrote:
> Hi:
>
> I have the following example: "hELLO THERE!"
>
> Using Mathematica 8.0.4, how can I swap the lowercase and uppercase letters to output,
>
> "Hello there!"
>
>
> Thanks,
>
> Bill
>