Improved the distance algorithm to take into account whether or not the result contains the search
This commit is contained in:
parent
755d7b37f6
commit
61fb0e38f1
@ -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];
|
return arr[str1_len][str2_len];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user