Net.Sf.Dbdeploy.OptionsManager.StripQuotes C# (CSharp) Method

StripQuotes() private static method

Strips the quotes from around the value.
private static StripQuotes ( string value ) : string
value string The value.
return string
        private static string StripQuotes(string value)
        {
            if (value != null)
            {
                value = value.Trim();

                if ((value.StartsWith("\"", StringComparison.OrdinalIgnoreCase) && value.EndsWith("\"", StringComparison.OrdinalIgnoreCase))
                    || (value.StartsWith("'", StringComparison.OrdinalIgnoreCase) && value.EndsWith("'", StringComparison.OrdinalIgnoreCase)))
                {
                    return value.Substring(1, value.Length - 2);
                }
            }

            return value;
        }
    }