• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Convert first char to lower case
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert first char to lower case


  • Subject: Re: Convert first char to lower case
  • From: Kai Edwards <email@hidden>
  • Date: Tue, 08 Jan 2002 03:03:45 +0100

> Date: Mon, 7 Jan 2002 23:46:53 +0000
> To: email@hidden
> From: has <email@hidden>
> Subject: Re: Convert first char to lower case
>
> Olivier Berquin wrote:
>
>> I wrote this handler, but I'm not sure that it's very powerfull.
>> It convert the first character of a var to lower case.
>>
>> Somebody can help me ???
>
> Your script got a bit mashed by the list server (which trashes characters
> whose ASCII number are greater than 127, e.g. "not equal to" and "is less
> than or equal to" signs).

has,

I also had a look at this one (same digest as your response) - but
completely missed the implications when trying to 'decipher' Olivier's
script.

While I was aware of certain characters being affected by the list server, I
didn't know about these. (Much knitted brows and egg on face when my
suggestion returned with the same flaws!) I'll certainly try to remember the
pitfalls in future!

You also said:

> Secondly, when you get "characters x thru y", you actually get a list
> containing each character: {"h", "i", "s",...} rather than a string.
> Because you're concatenating this list onto the end of a string, it gets
> coerced back to a string again and the result is the same; however, the
> extra work involved means the code is slower. Instead, use the "text"
> keyword, as in:
>
> text 2 thru -1 of Variable1

Of course - so much more efficient! (Following the same principle, I also
noted your much improved 'length of Variable1' in place of 'count of
character of Variable1')

As I mentioned in my own reply:

> One thing I'm learning is that there's nearly always a better/easier/faster
> way of doing things.

Well you just proved the point very poignantly!

Many thanks for clarifying these issues.

Kai

--

**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************


  • Prev by Date: Re: AppleScript and Email clients
  • Next by Date: Re: AppleScript and Email clients
  • Previous by thread: Re: Convert first char to lower case
  • Next by thread: Re: Convert first char to lower case
  • Index(es):
    • Date
    • Thread