To set a string with the first letter to uppercase use the bellow code
1: string myString = "hello world!";
2: myString = Regex.Replace(myString, "(?:^|\\s)\\w", new MatchEvaluator(delegate(Match m) { return m.Value.ToUpper(); }));
Sharing the Knowledge about programming with jQuery, Java, ASP.NET, PHP, C# ......
To set a string with the first letter to uppercase use the bellow code
1: string myString = "hello world!";
2: myString = Regex.Replace(myString, "(?:^|\\s)\\w", new MatchEvaluator(delegate(Match m) { return m.Value.ToUpper(); }));
1 comments:
Post a Comment