Skip to content
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); // ''

extra-string

Clone this wiki locally