aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorOren Hurvitz2012-12-16 09:48:37 +0200
committerJustin Clark-Casey (justincc)2013-01-02 23:31:19 +0000
commit1b826b487739220503458ccc6b07ec40c54e1164 (patch)
tree4a856ed0f83de5e2553a8353c9015386c41e3963 /OpenSim/Framework/Util.cs
parentFixed several problems with the Sun: some settings didn't work, or were incon... (diff)
downloadopensim-SC_OLD-1b826b487739220503458ccc6b07ec40c54e1164.zip
opensim-SC_OLD-1b826b487739220503458ccc6b07ec40c54e1164.tar.gz
opensim-SC_OLD-1b826b487739220503458ccc6b07ec40c54e1164.tar.bz2
opensim-SC_OLD-1b826b487739220503458ccc6b07ec40c54e1164.tar.xz
Allow registering regions whose names are equivalent under LIKE but not truly equal
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 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}