class

Analyzer::Dart::Helper::LineIndex

Inherits Reference < Object

Analyzer#line_number_for_index for many lookups into one file: the newline offsets are collected once, then each lookup is a binary search instead of a rescan from the start of the file per route.

Constructors

new(content : String)
Source

Instance methods

line_for(char_index : Int32) : Int32

1-based line of a CHAR offset.

Source