Posts Tagged ‘C++/CLI

String to Proper Case in C++/CLI

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)
{
[...]

Tags: ,


  • None
  • Selene: Buahaha, you wrote savage on purpose! XD Nice, so you made it! That's great!

Categories