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