gpt_engineer.core.diff.count_ratio

gpt_engineer.core.diff.count_ratio(str1, str2) float[source]

Computes the ratio of common characters to the length of the longer string, ignoring spaces and case.

Parameters: - str1, str2 (str): The strings to compare.

Returns: - float: The ratio of common characters to the length of the longer string.