Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

19 rindas
600 B

pirms 4 gadiem
  1. var baseIndexOf = require('./_baseIndexOf');
  2. /**
  3. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  4. * that is not found in the character symbols.
  5. *
  6. * @private
  7. * @param {Array} strSymbols The string symbols to inspect.
  8. * @param {Array} chrSymbols The character symbols to find.
  9. * @returns {number} Returns the index of the last unmatched string symbol.
  10. */
  11. function charsEndIndex(strSymbols, chrSymbols) {
  12. var index = strSymbols.length;
  13. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  14. return index;
  15. }
  16. module.exports = charsEndIndex;