Urara-Blog/node_modules/.pnpm-store/v3/files/19/ab897aea41f8d30bd62cd635d2b49a31ad6e5b45ae01f3268824ac9b2d91f8495c947e20e35fcb1113b3f1cd29c40c7311423e49fc5ac4e4b9075ca2db23fc
2022-08-14 01:14:53 +08:00

19 lines
515 B
Text

/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}
module.exports = trimmedEndIndex;