Does anyone have a nice algorithm for capitolizing first characters of words? For example: The cow can't jump over the moon. -becomes- The Cow Can't Jump Over The Moon. -and 'neath the old olive tree -becomes- 'Neath The Old Olive Tree -and- help me (if you can) - becomes- Help Me (If You Can).

Notice the characters after the hyphens and left-parens

Obviously; spaces, tabs and CRLFs are word delimiters, but hyphens and other punctuation and special characters can be, given context. I think 100% perfect is not likely, but 99+% converage may be?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.