* 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.
(string)
| 1363 | * @returns {number} Returns the index of the last non-whitespace character. |
| 1364 | */ |
| 1365 | function trimmedEndIndex(string) { |
| 1366 | var index = string.length; |
| 1367 | |
| 1368 | while (index-- && reWhitespace.test(string.charAt(index))) {} |
| 1369 | return index; |
| 1370 | } |
| 1371 | |
| 1372 | /** |
| 1373 | * Used by `_.unescape` to convert HTML entities to characters. |