Simple Function to capitalize a string

Recently I was required to write a function that would capitalize the 1st letter in every word. This is a fairly common requirement and I felt that there would be some good syntax or code available on the Internet. On Googling I did find a couple of links but they all felt a bit cumbersome…