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;
}