nano-rows
Text rows indexer. Calculates text coords (row/col) by character index.
var Rows = ; var index = fs 'source.txt'; try console; catch e console;
API
Constructor: Rows(text, name)
- text
String
- name
String
-- text name
rows.get_coords(offset)
Returns [ row, col ] for the character offset
.
rows.get_label(offset)
Returns text like "{text-name}({row},{col})".