Percentage for "similar_text"
emresaracoglu opened this issue · comments
Hello,
How can I get the result as a percentage?
https://github.com/locutusjs/locutus/blob/master/src/php/strings/similar_text.js
Thank you
It's not possible in JavaScript to implement the function exactly like PHP does, so in order to get the percentage, call the function with true
as last param.
const resultPercent = similar_text("abc", "abc", true); // 100
@kukawski Thank you.