Sitecore 5.1.1 API

MainUtil.Capitalize Method 

NOTE: This method is now obsolete.

Use StringUtil.Capitalize instead.


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

MainUtil Class | Sitecore Namespace