main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
600 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | var baseIndexOf = require('./_baseIndexOf');
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
|
---|
| 5 | * that is not found in the character symbols.
|
---|
| 6 | *
|
---|
| 7 | * @private
|
---|
| 8 | * @param {Array} strSymbols The string symbols to inspect.
|
---|
| 9 | * @param {Array} chrSymbols The character symbols to find.
|
---|
| 10 | * @returns {number} Returns the index of the last unmatched string symbol.
|
---|
| 11 | */
|
---|
| 12 | function charsEndIndex(strSymbols, chrSymbols) {
|
---|
| 13 | var index = strSymbols.length;
|
---|
| 14 |
|
---|
| 15 | while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
---|
| 16 | return index;
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | module.exports = charsEndIndex;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.