internal string GetEscapedValue(string value, char?escapeChar = null) { if (escapeChar.HasValue) { return(_dialect.Escape(value, escapeChar.Value)); } return(_dialect.Escape(value)); }
public void testExpressionFunctions_escape_withBackslash() { var dialect = new StandardDialect(); dialect.Escape("a\\a%a_", '\\').Is("a\\\\a\\%a\\_"); //var input = "a\\a%a_"; //var result = Regex.Replace(input, "[\\%\\\\_]", "\\$0"); //result.Is("a\\\\a\\%a\\_"); //var input = "a\\a%a_"; //var result = Regex.Replace(input, @"[\\%\\_]", "\\$0"); //result.Is("a\\\\a\\%a\\_"); //var input = "a\\a%a_"; //var result = Regex.Replace(input, "[\\\\%\\\\_]", "\\$0"); //result.Is("a\\\\a\\%a\\_"); }
public void testExpressionFunctions_escape_withExclamation() { var dialect = new StandardDialect(); dialect.Escape("a!a%a_", '!').Is("a!!a!%a!_"); }
public void testExpressionFunctions_escape() { var dialect = new StandardDialect(); dialect.Escape("a$a%a_").Is("a$$a$%a$_"); }