-
Notifications
You must be signed in to change notification settings - Fork 1
right
Subhajit Sahu edited this page May 5, 2020
·
1 revision
Return rightmost part of string.
var right = require('@extra-string/right');
// right(<string>, <length>)
right('Thai Sweet Chilli Sauce', 5); // 'Sauce'
right('Thai Sweet Chilli Sauce', 12); // 'Chilli Sauce'
right('Thai Sweet Chilli Sauce', 80); // 'Thai Sweet Chilli Sauce'
right('Thai Sweet Chilli Sauce', -1); // ''