Renamed project to CCharLearn
This commit is contained in:
parent
a6f55347b8
commit
591c3307a9
233 changed files with 16 additions and 17 deletions
15
CCharLearn/ExtensionMethods/StringExtensions.cs
Normal file
15
CCharLearn/ExtensionMethods/StringExtensions.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
namespace CCharLearn.ExtensionMethods
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string ToTitleCase(this string input)
|
||||
{
|
||||
char firstLetter = input[0];
|
||||
firstLetter = char.ToUpper(firstLetter);
|
||||
|
||||
string restOfString = input.Substring(1, input.Length - 1);
|
||||
|
||||
return firstLetter + restOfString;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue