Fwd: Name rearrangement
Fwd: Name rearrangement
- Subject: Fwd: Name rearrangement
- From: Michelle Steiner <email@hidden>
- Date: Tue, 30 Mar 2004 08:00:47 -0700
Begin forwarded message:
From: Michelle Steiner <email@hidden>
Date: March 30, 2004 7:59:44 AM MST
To: Jim Witte <email@hidden>
Subject: Re: Name rearrangement
On Mar 30, 2004, at 1:04 AM, Jim Witte wrote:
What's a script that will take a name in the form of "STOOGE, CURLY"
and turn it into "Curly Stooge"
Not counting case change, and assuming no middle name, prefix (e.g.,
Ms. or Mr.) or suffix (e.g., Jr. or esq.), try this:
set the_Person to "Stooge, Curly"
set {tid, AppleScript's text item delimiters} to {AppleScript's text
item delimiters, ", "}
set the_Person to text items of the_Person
set text item delimiters to space
set the_Person to (reverse of the_Person) as text
set AppleScript's text item delimiters to tid
the_Person
--
"The past is like a foreign country. They do things differently
there." --Leslie Poles Hartley
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.