Skip to content

Instantly share code, notes, and snippets.

@founddrama
Created December 20, 2010 17:02
Show Gist options
  • Save founddrama/748643 to your computer and use it in GitHub Desktop.
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...
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