StringExtensions.ToTitleCase

Extension Method in StringExtensions

Declaration

public static string ToTitleCase(this string str, string defaultText = null)

Description

Formats the string using title case. If the string is null, then the default text will be returned instead.

Parameters

strThe string to format.
defaultTextAn optional string returned if the formatted string is null.

Returns

stringThe formatted string.