There was an error while loading. Please reload this page.
Get common prefix of strings.
const commonPrefix = require('@extra-string/common-prefix'); // commonPrefix(<string-1>, <string-2>) commonPrefix('peacock', 'peahen'); // 'pea' commonPrefix('inception', 'interstellar'); // 'in' commonPrefix('mars', 'tars'); // ''