Script to uppercase or lowercase a string
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. |
----------------------------------------------------------------------