There is no standard function for capitalization, but it's pretty easy to write one.
The most performant version is this (from when I tested them a long time ago):
static string CapitalizeFirstWord(string s)
{
if (string.IsNullOrWhitespace(s))
{
return "";
}
char[] a = s.ToCharArray();
a[0] = char.ToUpper(a[0]);
return new string(a);
}
But ... it's not a good idea to do it. You should treat people's names as accurate when given as changing them can give offense, and some names are more complicted than "John Smith". Examples would include
John Smith the Third
John von Smith
John Von Smith
John deSmith
John DeSmith
John ffoulkes-Smith
John Double-Barrelled
John O'Smith
There are loads of other prefixes as well: "el" from the Spanish, "le" and "la" from French, ... the list goes on.
The only way to tell how a name should be capitalised is to ask the "owner" - and you did that when they input the name to start with!