Sitecore 5.0 API

StringUtil.Unquote Method 

Removes enclosing single and double quotes from a string.

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

Parameters

text
A string.

Return Value

The unquoted string.

Example

  string s0 = StringUtil.Unquote("'Hello world'"); // "Hello world"
  string s1 = StringUtil.Unquote("'Hello Andy's world'"); // "Hello Andy's world"

See Also

StringUtil Class | Sitecore Namespace