sez [EMAIL PROTECTED]: >>From: david bovill <[EMAIL PROTECTED]:lCase words in some text >>- anyone have a regular expression or script for this? >Depending on the complexity of your text, you might find the >following function useful: > >function thereIsAnInteriorCapitalLetter tText --Self referential name > delete char 1 of tText > delete char -1 of tText Stupid question: Why delete char -1? What difference would it make if you didn't?
> set the caseSensitive to true > if toLower(tText)= tText then > return false > else return true This IF statement can be replaced by one line: "return (not (toLower (tText) = tText))" >end thereIsAnInteriorCapitalLetter This handler may or may not do Bovill's job, depending on what sort of strings count as being CamelCase. A few test-cases: "getLost" -- true "ALPHABET" -- true "explicitX" -- false I suspect that all-caps strings ought not be considered CamelCase, myself... _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
