• 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: Manipulating text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manipulating text


  • Subject: Re: Manipulating text
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 25 Sep 2009 09:57:52 -0400

On Fri, Sep 25, 2009 at 9:35 AM, Luther Fuller <email@hidden> wrote:
> For example ...
> (*
> id of "a" -- 97
> id of "z" -- 122
> id of "A" -- 65
> id of "Z" -- 90
> *)

Not a good way to go in the age of Unicode; completely fails for
accented characters, other alphabets, etc.  Need either an osax or an
external app that understands case mappings.  Quickie Perl example:

set theText to "OIL_OF_OLÉ"
do shell script "perl -Mencoding=utf8 -lpe
's/(^|[_\\s])([^_\\s]+)/($1?\" \":\"\") . ucfirst(lc($2))/ge' <<<" &
quoted form of theText
--> Oil Of Olé


--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Manipulating text
      • From: Luther Fuller <email@hidden>
References: 
 >Manipulating text (From: Jim Brandt <email@hidden>)
 >Re: Manipulating text (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Manipulating text
  • Next by Date: Re: Manipulating text
  • Previous by thread: Re: Manipulating text
  • Next by thread: Re: Manipulating text
  • Index(es):
    • Date
    • Thread