Skip to content

Instantly share code, notes, and snippets.

@scorta
Created August 1, 2014 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scorta/7b5bd6176fa255241ea6 to your computer and use it in GitHub Desktop.
Save scorta/7b5bd6176fa255241ea6 to your computer and use it in GitHub Desktop.
private string CapitalizedString(string input)
{
string[] arr = input.Split(' ');
string result = string.Empty;
foreach (string a in arr)
{
result += a.First().ToString().ToUpper() + a.Substring(1) + " ";
}
return result.Trim();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment