CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
_trimmedEndIndex.js20 linesDownload Raw Back to lodash
1/** Used to match a single whitespace character. */2var reWhitespace = /\s/;3 4/**5 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace6 * character of `string`.7 *8 * @private9 * @param {string} string The string to inspect.10 * @returns {number} Returns the index of the last non-whitespace character.11 */12function trimmedEndIndex(string) {13  var index = string.length;14 15  while (index-- && reWhitespace.test(string.charAt(index))) {}16  return index;17}18 19module.exports = trimmedEndIndex;20 
basant307/AI_Governance_Project · CoolFace