Improved the distance algorithm to take into account whether or not the result contains the search

This commit is contained in:
Scoopta 2020-01-26 12:18:32 -08:00
parent 755d7b37f6
commit 61fb0e38f1

View File

@ -91,5 +91,9 @@ size_t utils_distance(const char* str1, const char* str2) {
}
}
if(strstr(str1, str2) != NULL) {
arr[str1_len][str2_len] -= str2_len;
}
return arr[str1_len][str2_len];
}