Question

I'm currently trying to find an easy way to convert a Visual (Managed) C++ string to title case. In VB.NET, you can use either:

StrConv(sampleString, vbProperCase)

or

sampleString = System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(sampleString)

In C# you use:

sampleString = System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(sampleString)

How do I do it in Visual C++? Is it something similar that I just can't seem to find?

Was it helpful?

Solution

Check the documentation on TextInfo.ToTitleCase it has examples for Managed C++

OTHER TIPS

If you're talking about managed C++, you can use the same functions as in C#/VB.Net.

If you mean native C++, then:

  1. Pretty certain there's nothing of the sort in the language itself.
  2. AFAIK not in the Win32 API as well.
  3. Your best hope then is to find such a function in some library (I personally can't think of one).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top