diff options
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 4fd8a2d..f511494 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -2102,5 +2102,16 @@ namespace OpenSim.Framework | |||
2102 | return firstName + "." + lastName + " " + "@" + uri.Authority; | 2102 | return firstName + "." + lastName + " " + "@" + uri.Authority; |
2103 | } | 2103 | } |
2104 | #endregion | 2104 | #endregion |
2105 | |||
2106 | /// <summary> | ||
2107 | /// Escapes the special characters used in "LIKE". | ||
2108 | /// </summary> | ||
2109 | /// <remarks> | ||
2110 | /// For example: EscapeForLike("foo_bar%baz") = "foo\_bar\%baz" | ||
2111 | /// </remarks> | ||
2112 | public static string EscapeForLike(string str) | ||
2113 | { | ||
2114 | return str.Replace("_", "\\_").Replace("%", "\\%"); | ||
2115 | } | ||
2105 | } | 2116 | } |
2106 | } | 2117 | } |