Skip to content

Commit cd94388

Browse files
committed
Update README.md
1 parent 7a8e193 commit cd94388

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# LNR
22

3-
[![Build Status](https://travis-ci.org/one-more-minute/LNR.jl.svg?branch=master)](https://travis-ci.org/one-more-minute/LNR.jl)
3+
LNR.jl implements a `LineNumberingReader` type which transparently wraps any other reader (`::IO`). It's intended for working with hand written text where line and column information is significant, and provides functions for working with this information.
4+
5+
`LineNumberingReader`s can be created with either an IO object or a string as a parameter.
6+
7+
The `Cursor` type, which has the `line` and `column` fields, represents a position between two characters (and not the character itself). So `Cursor(n, m)` represents the position just before the `m`th character on line `n`. Comparisons are supported.
8+
9+
The `cursor` function gives the current position in the stream as a cursor. `seek` can be called as usual, but with a `Cursor` instead of an integer, to set the reader at any position in the file.
10+
11+
Other than that, standard IO functions are wrapped, so you can use a line reader as you would any other stream.

0 commit comments

Comments
 (0)