• 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
Script to uppercase or lowercase a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script to uppercase or lowercase a string


  • Subject: Script to uppercase or lowercase a string
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 1 Jul 2001 12:05:56 -0700

I thought someone might be interested in this one.

--Michelle

global lowercasestring, uppercasestring
set lowercasestring to "abcdefghijklmnopqrstuvwxyz"
set uppercasestring to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

lowercase("Michelle Steiner")

to uppercase(text_to_process)
set tid to text item delimiters
repeat with loop from 1 to count lowercasestring
set the lower_letter to item loop of lowercasestring
set the text item delimiters to the lower_letter
set the character_list to the text items of the text_to_process
set the text item delimiters to item loop of the uppercasestring
set the text_to_process to the character_list as text
end repeat
set text item delimiters to ""
return the text_to_process
end uppercase

to lowercase(text_to_process)
set tid to text item delimiters
repeat with loop from 1 to count uppercasestring
set the lower_letter to item loop of uppercasestring
set the text item delimiters to the lower_letter
set the character_list to the text items of the text_to_process
set the text item delimiters to item loop of the lowercasestring
set the text_to_process to the character_list as text
end repeat
set text item delimiters to ""
return the text_to_process
end lowercase

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Search and Replace
  • Next by Date: Akua Sweets V1.42
  • Previous by thread: Re: Search and Replace
  • Next by thread: Akua Sweets V1.42
  • Index(es):
    • Date
    • Thread