def offset_to(source_position, pattern, offset = 0)
      actual_line   = source_position.line - 1
      actual_offset = source_position.offset + offset - 1

      return nil if actual_line >= engine.lines.size

      actual_index = engine.lines[actual_line].index(pattern, actual_offset)

      actual_index && actual_index + 1 - source_position.offset
    end
def offset_to(source_position, pattern, offset = 0)
      actual_line   = source_position.line - 1
      actual_offset = source_position.offset + offset - 1

      return nil if actual_line >= engine.lines.size

      actual_index = engine.lines[actual_line].index(pattern, actual_offset)

      actual_index && actual_index + 1 - source_position.offset
    end
Starting at source_position (plus offset), search for pattern and return
 the offset from the source_position.

 @param source_position [Sass::Source::Position]
 @param pattern [String, RegExp] the pattern to search for
 @param offset [Integer]
 @return [Integer] the offset at which [pattern] was found.