build/ical.js
function(buffer, search, pos) {
    while ((pos = buffer.indexOf(search, pos)) !== -1) {
      if (pos > 0 && buffer[pos - 1] === '\\') {
        pos += 1;
      } else {
        return pos;
      }
    }
    return -1;
  }
function(buffer, search, pos) {
    while ((pos = buffer.indexOf(search, pos)) !== -1) {
      if (pos > 0 && buffer[pos - 1] === '\\') {
        pos += 1;
      } else {
        return pos;
      }
    }
    return -1;
  }
function ( buffer , search , pos ) { while ( ( pos = buffer . indexOf ( search , pos ) ) !== - 1 ) { if ( pos > 0 && buffer [ pos - 1 ] === '\\' ) { pos += 1 ; } else { return pos ; } } return - 1 ; }
Identical to indexOf but will only match values when they are not preceded
by a backslash character.

@param {String} buffer         String to search
@param {String} search         Value to look for
@param {Number} pos            Start position
@return {Number}               The position, or -1 if not found
Identical to indexOf but will only match values when they are not preceded by a backslash character .