The other day I had posted on capitalizing the first letter of a string in
every word? With PHP it’s just a simple call to
ucwords and just as easy in
Ruby and Python.
To be able to pull this off we will need to leverage the power of regular expressions to :
There is a slight assumption that you want to force the rest of the string to be
lowercased in the example. If you would prefer to retain the existing case, just
omit the final