foxts
Version:
Opinionated collection of common TypeScript utils by @SukkaW
1 lines • 188 B
JavaScript
function t(t,e){const r=t.length,n=e.length,o=r<n?r:n;let a=0;for(let r=0;r<o;++r)if(0!=(a=t.charCodeAt(r)-e.charCodeAt(r)))return a;return r===n?0:r>n?1:-1}export{t as fastStringCompare};