- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
private int GetInsertion(byte[] firstArr, byte[] secondArr)
{
int result = -1;
int counter = 0;
if (firstArr.Count() >= secondArr.Count())
{
for (int i = 0; i < firstArr.Count(); i++)
{
if (firstArr[i] == secondArr[counter])
{
counter++;
if (counter == secondArr.Count())
{
result = i - counter + 1;
break;
}
}
else
{
counter = 0;
}
}
}
return result;
}
guest8 09.04.2019 12:53 # −999