Custom Contains
Anonymous
csharp
12/20/2022 1:50 PM
804 B
16
Indexable
public static bool CustomContains(this string value, string searchValue)
{
int valueCount = 0;
for (int i = 0; i < value.Length; i++)
{
for (int j = valueCount; j < searchValue.Length; j++)
{
if (value[i] == searchValue[j])
valueCount++;
if (valueCount == searchValue.Length)
return true;
else
break;
}
}
return false;
}Editor is loading...