Comparing for case difference
Comparing for case difference
- Subject: Comparing for case difference
- From: Laine Lee <email@hidden>
- Date: Wed, 18 Dec 2002 13:58:46 -0600
I have this script that checks for case difference between two strings, but
if the strings are very long, this can really eat up time.
Can you give me something better for comparing long strings for case
difference? Thanks.
set a to "jeremiah"
set b to "jeremiaH"
Checkchange(a, b)
on Checkchange(x_string, y_string)
set mychanged to false
repeat with this_char in x_string
set myitem to (offset of this_char in y_string)
try
get (item myitem of y_string)
on error
set mychanged to true
exit repeat
end try
end repeat
if not mychanged then
display dialog "Same!" buttons {"OK"} default button 1
else
display dialog "Different!" buttons {"OK"} default button 1
end if
end Checkchange
--
Laine Lee
email@hidden
http://www.txdirect.net/users/llee
_______________________________________________
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.