How to capitalize the first character of each word, or the first character of a whole string, with C#?
问题 I could write my own algorithm to do it, but I feel there should be the equivalent to ruby's humanize in C#. I googled it but only found ways to humanize dates. Examples: A way to turn "Lorem Lipsum Et" into "Lorem lipsum et" A way to turn "Lorem lipsum et" into "Lorem Lipsum Et" 回答1: As discussed in the comments of @miguel's answer, you can use TextInfo.ToTitleCase which has been available since .NET 1.1. Here is some code corresponding to your example: string lipsum1 = "Lorem lipsum et"; //