Sitecore 5.0 API

StringUtil.Capitalize Method 

Uppercases the first letter of a string and lowercases the remaining letters.

[Visual Basic]
Public Shared Function Capitalize( _
   ByVal text As String _
) As String
[C#]
public static string Capitalize(
   string text
);

Parameters

text
A string.

Return Value

The capitalized string.

Remarks

Sentences are not taken into account.

Example

  string text = MainUtil.Capitalize("HELLO WORLD."); // "Hello world"
  string text = MainUtil.Capitalize("HELLO. HOW ARE YOU?"); // "Hello. how are you?"

See Also

StringUtil Class | Sitecore Namespace