inference-server
Version:
Libraries and server to build AI applications. Adapters to various native bindings allowing local inference. Integrate it with your application, or use as a microservice.
9 lines • 343 B
JavaScript
export function getLargestCommonPrefix(str1, str2) {
const minLength = Math.min(str1.length, str2.length);
let prefixLength = 0;
while (prefixLength < minLength && str1[prefixLength] === str2[prefixLength]) {
prefixLength++;
}
return str1.slice(0, prefixLength);
}
//# sourceMappingURL=getLargestCommonPrefix.js.map