public LSL_Integer llListFindList(LSL_List src, LSL_List test)
{
int index = -1;
int length = src.Length - test.Length + 1;
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return 0;
// If either list is empty, do not match
if (src.Length != 0 && test.Length != 0)
{
for (int i = 0; i < length; i++)
{
if (src.Data[i].Equals(test.Data[0]))
{
int j;
for (j = 1; j < test.Length; j++)
if (!src.Data[i + j].Equals(test.Data[j]))
break;
if (j == test.Length)
{
index = i;
break;
}
}
}
}
return index;
}