_string = toLower (_this select 0); // removes case sensitivity
_searchTerm = toLower (_this select 1);
_arraySearchTerm = toArray _searchTerm; // splits string into array of unicode decimals
_arrayString = toArray _string;
_sizeSearchTerm = count _arraySearchTerm; // We only measure the array once
_sizeString = count _arrayString;
_matchingCharacters = 0;
_targetIterator = 0;
_searchIterator = 0;
while {(_searchIterator < _sizeSearchTerm) && (_targetIterator < _sizeString)} do { // Prevents us from going out of bounds
if ((_arraySearchTerm select _searchIterator) == (_arrayString select _targetIterator)) then { // If we have a match, start looking for the next character in the search term