Question
Compare two strings and give percentage to it
HI All,
I have a two string stored in 2 Parameter. Param 1 , Param 2. I have to compare them and match the string and give the percentage of match.
Scenarios1 of Req. Param 1:- Saurabh Satyarthi Param 2:-Saurabh Satyarthi...All string match hence 100% match
Scenarios 2 of Req. Param 1:- Saurabh Satyarthi Param 2:-Saurabh ...half string match hence 50% match.
Scenarios 3 of Req. Param 1:- Saurabh Satyarthi Param 2:-Saurabh Saty...more than half match hence 75% match
Scenarios 4 of Req. Param 1:- Saurabh Satyarthi Param 2:-Saur Less than half match, hence 25% match
Note***Params would be dynamic, above scenario is for illustration purpose.
Please suggest how could above scenario's be achieved.
Regards,
Saurabh Satyarthi.
You can find the difference in two strings in terms of no of mismatch characters using the function : @stringDistance(Param.S1,Param.S2). Then try calculating percentage with this !!