function lineContainingChar(searchSpace, charOrId, nextIfEol) {
  if(_.isUndefined(nextIfEol)) nextIfEol = false

  if(!searchSpace || searchSpace.length === 0) {
    return {
      line: EMPTY_LINE,
      index: -1,
      endOfLine: null
    }
  }

  // shortcut searches at the beginning or end of the searchSpace, this is used often and these comparisons are fast
  if(charEq(searchSpace[0].start, charOrId)) {
    return {
      line: searchSpace[0],
      index: 0,
      endOfLine: !charEq(charOrId, BASE_CHAR)
    }
  } else if(charEq(searchSpace[searchSpace.length - 1].end, charOrId)) {
    return {
      line: searchSpace[searchSpace.length - 1],
      index: searchSpace.length - 1,
      endOfLine: true
    }
  }

  for(let i = 0; i < searchSpace.length; i++) {
    let line = searchSpace[i]
    if(line.hasChar(charOrId)) {
      let index = i
      let endOfLine = charEq(charOrId, line.end)
      if(nextIfEol && endOfLine && !line.isEof() && searchSpace.length - 1 > i) {
        index++
        line = searchSpace[index]
      }

      return {
        line: line,
        index: index,
        endOfLine: endOfLine
      }
    }
  }

  return null
}
Search the given search space for the line containing the provided char. If the search
space is empty, an empty "virtual" line starting at BASE_CHAR and ending at EOF is returned.
@param searchSpace The set of lines to search.
@param charOrId The char or char id to search for.
@param  {boolean} [nextIfEol=false] If at end of line, return the next line.
@returns {*}