locutusjs / locutus

Bringing stdlibs of other programming languages to JavaScript for educational purposes

Home Page:https://locutus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Percentage for "similar_text"

emresaracoglu opened this issue · comments

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