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(); }));
If I'd had some set idea of a finish line, don't you think I would have crossed it years ago?
1 comments:
Post a Comment