2 * Used by `_.trim` and `_.trimRight` to get the index of the last character
3 * of `string` that is not found in `chars`.
6 * @param {string} string The string to inspect.
7 * @param {string} chars The characters to find.
8 * @returns {number} Returns the index of the last character not found in `chars`.
10 function charsRightIndex(string, chars) {
11 var index = string.length;
13 while (index-- && chars.indexOf(string.charAt(index)) > -1) {}
17 module.exports = charsRightIndex;