Skip to content

Commit 60056b8

Browse files
committed
Expose len
1 parent 9d4d452 commit 60056b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/line-index/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,9 @@ impl LineIndex {
229229
.map(|(lo, hi)| TextRange::new(lo, hi))
230230
.filter(|it| !it.is_empty())
231231
}
232+
233+
/// Returns the length of the original text.
234+
pub fn len(&self) -> TextSize {
235+
self.len
236+
}
232237
}

0 commit comments

Comments
 (0)