I need an algorithm of sorts that will return a comparison value that can be used regardless of the string's length. I have tried a few different methods to this, but quite frankly, I suck at maths.
Basically I need to get a value that finds the percentage of different characters in a string and return them to a value that can be used against a threshold.
Here are some examples:
A Sample String -> A Samlpe String
2 character missing..
A Substantially Longer Sample String - > A Substantially Longer Samlpe String
still 2 character missing..
So how could I make something that returns a similar value, regardless of string length?