Posted by: jorgedbucaran on: February 9, 2008
Unfortunately there is no String::ToProperCase() in the .NET Framework, but there is TextInfo::ToTitleCase which is not that bad and actually provides international support. Can’t help a chuckle from that statement. However, if you don’t like:
TextInfo ^texti = gcnew CultureInfo(“en-US”, false)->TextInfo
You can always implement your own simplified version. I share mine here:
String ^toTitleCase(String ^string)
{
[...]