Aurora.ScriptEngine.AuroraDotNetEngine.APIs.LSL_Api.llListInsertList C# (CSharp) Method

llListInsertList() public method

Insert the list identified by into the list designated by such that the first new element has the index specified by
public llListInsertList ( Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.list dest, Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.list src, int index ) : Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.list
dest Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.list
src Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.list
index int
return Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.list
        public LSL_List llListInsertList(LSL_List dest, LSL_List src, int index)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return new LSL_List();

            LSL_List pref = null;
            LSL_List suff = null;



            if (index < 0)
            {
                index = index + dest.Length;
                if (index < 0)
                {
                    index = 0;
                }
            }

            if (index != 0)
            {
                pref = dest.GetSublist(0, index - 1);
                if (index < dest.Length)
                {
                    suff = dest.GetSublist(index, -1);
                    return pref + src + suff;
                }
                return pref + src;
            }
            if (index < dest.Length)
            {
                suff = dest.GetSublist(index, -1);
                return src + suff;
            }
            return src;
        }
LSL_Api