• 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: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]


  • Subject: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
  • From: KOENIG Yvan <email@hidden>
  • Date: Mon, 16 Mar 2009 19:09:36 +0100

Here is an enhanced version:

<script>
on upper_case(theString) --> string
local newString
local lowRoman, upRoman, c, a, i (* added *)
set lowRoman to "œæáàâäãåéèêëóòôöõúùûüíìîïñçøÿπ"
set upRoman to "ŒÆÁÀÂ�ÄÃÅÉÈÊËÓÒÔÖÕÚÙÛÜÍÌÎÏÑÇØŸ∏"
set newString to ""
repeat with c in characters of theString
set c to contents of c
set a to ASCII number of c
if a > 96 and a < 123 then
set a to a - 32
set newString to newString & (ASCII character a)
else if c is in lowRoman then
set newString to newString & character (offset of c in lowRoman) of upRoman
else
set newString to newString & c
end if
end repeat
set theString to newString
end upper_case


on lower_case(theString) --> string
local newString (* added *)
local lowRoman, upRoman, c, a, i (* added *)
set lowRoman to "œæáàâäãåéèêëóòôöõúùûüíìîïñçøÿπ"
set upRoman to "ŒÆÁÀÂ�ÄÃÅÉÈÊËÓÒÔÖÕÚÙÛÜÍÌÎÏÑÇØŸ∏"
set newString to ""
repeat with c in characters of theString
set c to contents of c
set a to ASCII number of c
if a > 64 and a < 91 then
set a to a + 32
set newString to newString & (ASCII character a)
else if c is in upRoman then
set newString to newString & character (offset of c in upRoman) of lowRoman
else
set newString to newString & c
end if
end repeat
set theString to newString
end lower_case


return {my upper_case("Kœnig"), my lower_case("GÉNÉRAL KŒNIG")}
<script>

Yvan KOENIG (from FRANCE lundi 16 mars 2009 19:07:12)


_______________________________________________ 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
References: 
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: Shane Stanley <email@hidden>)
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: Jon Pugh <email@hidden>)
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: KOENIG Yvan <email@hidden>)
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: Jon Pugh <email@hidden>)
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: KOENIG Yvan <email@hidden>)
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: Jon Pugh <email@hidden>)
 >Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript] (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
  • Next by Date: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
  • Previous by thread: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
  • Next by thread: Re: Re. third-party dependencies [was Re: Stock Quotes using AppleScript]
  • Index(es):
    • Date
    • Thread