diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs index 7073830615..dd46fa4582 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs @@ -1829,6 +1829,11 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.llGetParcelDetails(pos, param); } + public string llStringTrim(string src, int type) + { + return m_LSL_Functions.llStringTrim(src, type); + } + // // OpenSim Functions // @@ -1853,6 +1858,13 @@ namespace OpenSim.Region.ScriptEngine.Common return m_LSL_Functions.osRegionRestart(seconds); } + public void osRegionNotice(string msg) + { + m_LSL_Functions.osRegionNotice(msg); + } + + + // LSL CONSTANTS public const int TRUE = 1; public const int FALSE = 0; @@ -2165,7 +2177,9 @@ namespace OpenSim.Region.ScriptEngine.Common public const double DEG_TO_RAD = 0.01745329238f; public const double RAD_TO_DEG = 57.29578f; public const double SQRT2 = 1.414213538f; - + public const int STRING_TRIM_HEAD = 1; + public const int STRING_TRIM_TAIL = 2; + public const int STRING_TRIM = 3; // Can not be public const? public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 9167632636..91cddf1ff9 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -3062,6 +3062,14 @@ namespace OpenSim.Region.ScriptEngine.Common return ret; } + public string llStringTrim(string src, int type) + { + if (type == (int)LSL_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } + if (type == (int)LSL_BaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } + if (type == (int)LSL_BaseClass.STRING_TRIM) { return src.Trim(); } + return src; + } + // // OpenSim functions // diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index 419398fa51..dbeeaf5063 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs @@ -633,11 +633,12 @@ namespace OpenSim.Region.ScriptEngine.Common int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); //wiki list llGetParcelDetails(vector pos, list params) LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); - + string llStringTrim(string src, int type); //OpenSim functions string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); double osTerrainGetHeight(int x, int y); int osTerrainSetHeight(int x, int y, double val); int osRegionRestart(double seconds); + void osRegionNotice(string msg); } } \ No newline at end of file