-
Couldn't load subscription status.
- Fork 1
common suffix
Subhajit Sahu edited this page May 5, 2020
·
1 revision
Get common suffix of strings.
const commonSuffix = require('@extra-string/common-suffix');
// commonSuffix(<string-1>, <string-2>)
commonSuffix('peacock', 'hancock');
// 'cock'
commonSuffix('mars', 'tars');
// 'ars'
commonSuffix('chief', 'master');
// ''