aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index e76ac24..c049247 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -2114,5 +2114,16 @@ namespace OpenSim.Framework
2114 return firstName + "." + lastName + " " + "@" + uri.Authority; 2114 return firstName + "." + lastName + " " + "@" + uri.Authority;
2115 } 2115 }
2116 #endregion 2116 #endregion
2117
2118 /// <summary>
2119 /// Escapes the special characters used in "LIKE".
2120 /// </summary>
2121 /// <remarks>
2122 /// For example: EscapeForLike("foo_bar%baz") = "foo\_bar\%baz"
2123 /// </remarks>
2124 public static string EscapeForLike(string str)
2125 {
2126 return str.Replace("_", "\\_").Replace("%", "\\%");
2127 }
2117 } 2128 }
2118} 2129}