Sha256: 859308ae1a10554879615b0bf2e429e464b92bfa3510943705209afa6ab78047
Contents?: true
Size: 516 Bytes
Versions: 167
Compression:
Stored size: 516 Bytes
Contents
/** * Used by `_.trim` and `_.trimRight` to get the index of the last character * of `string` that is not found in `chars`. * * @private * @param {string} string The string to inspect. * @param {string} chars The characters to find. * @returns {number} Returns the index of the last character not found in `chars`. */ function charsRightIndex(string, chars) { var index = string.length; while (index-- && chars.indexOf(string.charAt(index)) > -1) {} return index; } module.exports = charsRightIndex;
Version data entries
167 entries across 87 versions & 9 rubygems