compareCharPos(charOrId1, charOrId2) {
    invariant(charOrId1, 'First char must be defined.')
    invariant(charOrId2, 'Second char must be defined.')

    if(charOrId1 === EOF && charOrId2 === EOF) return 0
    else if(charOrId1 === EOF) return 1
    else if(charOrId2 === EOF) return -1

    let char1Id = _.has(charOrId1, 'id') ? charOrId1.id : charOrId1
    let char2Id = _.has(charOrId2, 'id') ? charOrId2.id : charOrId2

    let seen1 = false
    let seen1Index
    let seen2 = false
    let seen2Index
    for (let i = 0; i < this.data.len(); i++) {
      if (!seen1 && this.data.matches(i, char1Id)) {
        seen1 = true
        seen1Index = i
        // special case same char
        if(char1Id === char2Id) {
          return 0
        }
      }
      if (!seen2 && this.data.matches(i, char2Id)) {
        seen2 = true
        seen2Index = i
      }
      if (seen1 && seen2) {
        if(seen1Index < seen2Index) return -1
        else if(seen1Index === seen2Index) return 0
        else return 1
      }
    }
    throw new Error('One or both chars were not found.')
  }
Compares the position of two chars. Follows the contract of Java Comparator
(http://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#compare-T-T-) and returns
a negative integer, zero, or a positive integer as the first argument is positioned before,
equal to, or positioned after the second.
@param {Char|string} charOrId1
@param {Char|string} charOrId2
@return {number}