MCPcopy
hub / github.com/lodash/lodash / charsEndIndex

Function charsEndIndex

lodash.js:1091–1096  ·  view source on GitHub ↗

* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol * that is not found in the character symbols. * * @private * @param {Array} strSymbols The string symbols to inspect. * @param {Array} chrSymbols The character symbols to find. * @returns {number} Returns

(strSymbols, chrSymbols)

Source from the content-addressed store, hash-verified

1089 * @returns {number} Returns the index of the last unmatched string symbol.
1090 */
1091 function charsEndIndex(strSymbols, chrSymbols) {
1092 var index = strSymbols.length;
1093
1094 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
1095 return index;
1096 }
1097
1098 /**
1099 * Gets the number of `placeholder` occurrences in `array`.

Callers 2

trimFunction · 0.85
trimEndFunction · 0.85

Calls 1

baseIndexOfFunction · 0.85

Tested by

no test coverage detected