diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9df318c..d385042 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4598,10 +4598,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4598 | // ScriptSleep(5000); | 4598 | // ScriptSleep(5000); |
4599 | } | 4599 | } |
4600 | 4600 | ||
4601 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers) | 4601 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) |
4602 | { | 4602 | { |
4603 | m_host.AddScriptLPS(1); | 4603 | m_host.AddScriptLPS(1); |
4604 | LSL_List ret = new LSL_List(); | 4604 | LSL_List ret = new LSL_List(); |
4605 | LSL_List spacers = new LSL_List(); | ||
4606 | if (in_spacers.Length > 0 && separators.Length > 0) | ||
4607 | { | ||
4608 | for (int i = 0; i < in_spacers.Length; i++) | ||
4609 | { | ||
4610 | object s = in_spacers.Data[i]; | ||
4611 | for (int j = 0; j < separators.Length; j++) | ||
4612 | { | ||
4613 | if (separators.Data[j].ToString() == s.ToString()) | ||
4614 | { | ||
4615 | s = null; | ||
4616 | break; | ||
4617 | } | ||
4618 | } | ||
4619 | if (s != null) | ||
4620 | { | ||
4621 | spacers.Add(s); | ||
4622 | } | ||
4623 | } | ||
4624 | } | ||
4605 | object[] delimiters = new object[separators.Length + spacers.Length]; | 4625 | object[] delimiters = new object[separators.Length + spacers.Length]; |
4606 | separators.Data.CopyTo(delimiters, 0); | 4626 | separators.Data.CopyTo(delimiters, 0); |
4607 | spacers.Data.CopyTo(delimiters, separators.Length); | 4627 | spacers.Data.CopyTo(delimiters, separators.Length); |