Re: camelCase
Re: camelCase
- Subject: Re: camelCase
- From: Christopher Stone <email@hidden>
- Date: Tue, 17 Jan 2012 02:39:52 -0600
On Jan 17, 2012, at 01:01, Shane Stanley wrote: The point of having handlers in libraries, it seems to me, is to have code that just works, and doesn't need thinking about. Code that only works in English doesn't pass that test, IMO. ______________________________________________________________________
Agreed.
I also agree that after all these years Applescript should have native support for these kinds of conversions.
Somewhere out there is a vanilla handler written by Nigel Garvey (I think) that neatly handles accented characters, but I haven't had my hands on it for a while.
I still prefer the Satimage.osax - one of the many reasons I think it indispensable. (Please forgive the incorrect usage of accented characters in the example.)
set ex to "ţhe ƿeople ŏf ńeuchâtel might not be ĭmpressed"
--> Ţhe Ƿeople Ŏf Ńeuchâtel Might Not Be Ĭmpressed
set ex to "ŢHE ǷEOPLE ŎF ŃEUCHÂTEL MIGHT NOT BE ĬMPRESSED"
--> Ţhe Ƿeople Ŏf Ńeuchâtel Might Not Be Ĭmpressed
set camelCase to change "^(.)" into "\\l\\1" in camelCase with regexp
--> ţheǷeopleŎfŃeuchâtelMightNotBeĬmpressed
-- Best Regards, Chris
|
_______________________________________________
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