Created
December 20, 2010 17:02
-
-
Save founddrama/748643 to your computer and use it in GitHub Desktop.
Should convert "someCamelUrl" into "some-camel-url"; if only I could figure out how to shoe-horn it into Grails...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dehyphenator { | |
static String getActionName(String hyphenatedUrl) { | |
return hyphenatedUrl?.replaceAll("-.", { it[1].capitalize() } ) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment