Creates a new string with Title Case (ie "hEllO wORLd" becomes "Hello World") using the Invariant Culture - CSharp System

CSharp examples for System:String Case

Description

Creates a new string with Title Case (ie "hEllO wORLd" becomes "Hello World") using the Invariant Culture

Demo Code


using System.Text.RegularExpressions;
using System.Text;
using System.Linq;
using System.Globalization;
using System;// w  w  w.  j a  v  a  2 s  .  c o m

public class Main{
        /// <summary>
		/// Creates a new string with Title Case (ie "hEllO wORLd" becomes  "Hello World") using the Invariant Culture
		/// </summary>
		/// <param name="value">The string to convert</param>
		/// <returns>The string in title case</returns>
		public static string ToTitleCaseInvariant(this string value)
		{
			return ToTitleCase(value, CultureInfo.InvariantCulture);
		}
}

Related Tutorials