Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery custom string comparison function with output percentage

I am looking to write a function in Jquery that compares two strings and returns a percentage of similarity..exactly like the PHP function similar_text:

http://www.php.net/manual/en/function.similar-text.php

Ideas on how to tackle this with Jquery/Javascript? Thanks!

like image 359
Nathaniel Wendt Avatar asked Sep 27 '26 08:09

Nathaniel Wendt


1 Answers

PHP.JS have it: http://phpjs.org/functions/similar_text:902

like image 164
Igor Avatar answered Sep 28 '26 21:09

Igor