September 2001
Intermediate to advanced
768 pages
32h 45m
English
int levenshtein (string string_one, string string_two, [int insert_cost], [int substitution_cost], [int delete_cost])
| string_one | First string to compare |
| string_two | Second string to compare |
| insert_cost | Cost of inserting a character |
| substitution_cost | Cost of substituting a character |
| delete_cost | Cost of deleting a character |
Calculates the Levenshtein distance between two strings.
Returns:
Integer greater than zero (0); on error, an integer less than 0
Description:
levenshtein() is used to find the Levenshtein distance between two strings. The Levenshtein distance is defined as the fewest number of insert, substitution, and delete operations needed to transform one string into another string. The function is not case-sensitive. ...
Read now
Unlock full access