Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Use AppleScript to better work with Spaces' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Use AppleScript to better work with Spaces
Authored by: jonn8n on Dec 26, '07 11:53:31AM
This is what I get in my testing:
{make_lowercase("JØnathan"), make_lowercase_alt("JØnathan")}
-->{"jønathan", "jØnathan"}

on make_lowercase(the_string)
	return do shell script "echo " & quoted form of the_string & " | /usr/bin/perl -pe 'use encoding utf8; s/(\\w)/\\L$1/gi'"
end make_lowercase


on make_lowercase_alt(the_string)
	return do shell script "echo " & quoted form of the_string & " | /usr/bin/tr '[:upper:]' '[:lower:]'"
end make_lowercase_alt

Jon

[ Reply to This | # ]