s = s.replace(/(\w)(\w*)/g,
function(g0,g1,g2){return g1.toUpperCase() + g2.toLowerCase();});
( \w - alphanumerics ) - . .
: http://jsbin.com/uvase
- :
s = s.replace(/\w+/g,
function(w){return w[0].toUpperCase() + w.slice(1).toLowerCase();});
, , (helloworld vs hello-world). . Title Case, , "FBI", "the" "McDonalds".