
String::similarity calculates the similarity index of its two arguments. a value of 0 means that the strings are entirely different. a value of 1 means that the strings are identical. everything else lies between 0 and 1 and describes the amount of similarity between the strings.