I know there's a javascript solution for this problem, but how can I do this in Coffeescript? e.g. "HELLO" -> "Hello".
I have this so far, but I'm not sure on how to make it work for multiple words:
titleCase = (str) ->
str[0].toUpperCase() + str[1..str.length-1].toLowerCase()