Character function in .Net

Are there any built-in functions in .Net that allow you to use strings in strings or handle the proper wrapper? I know there is somewhere in the Microsoft.VB namespace, but I want to avoid them if possible.

I know about functions like string.ToUpper and string.ToLower () functions, but this affects the whole line. I am looking at something like this:

var myString = "micah"; myString = myString.Format(FormattingOptions.Capitalize) //Micah 
+4
source share
4 answers

Just to add another option to the mix. This will use every word in a given line:

 public static string ToTitleCase(string inputString) { System.Globalization.CultureInfo cultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture; System.Globalization.TextInfo textInfo = cultureInfo.TextInfo; return textInfo.ToTitleCase(inputString.ToLower()); } 
+9
source

There

 System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(string str) 

to use every word in a string. ToTitleCase

+4
source

Free Library Available ... String Processing Library

+2
source

It works in VB.NET

StrConv (Input, VbStrConv.ProperCase)

+1
source

All Articles