File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
# line-index
2
2
3
- This crate is developped as part of ` rust-analyzer ` .
3
+ This crate is developed as part of ` rust-analyzer ` .
4
4
5
- line-index is a library to convert between text offset and its corresponding line/column.
5
+ line-index is a library to convert between text offsets and corresponding line/column coordinates .
6
6
7
7
## Installation
8
8
9
9
To add this crate to a project simply run ` cargo add line-index ` .
10
10
11
11
## Usage
12
12
13
- The main structure is ` LineIndex ` . It is constructed with an utf-8 text then various utility functions can be used on it.
13
+ The main structure is ` LineIndex ` .
14
+
15
+ It is constructed with an UTF-8 string, but also supports UTF-16 and UTF-32 offsets.
14
16
15
17
### Example
16
18
@@ -25,4 +27,4 @@ line_index.offset(LineCol { line: 2, col: 3 }); // Some (24)
25
27
26
28
## SemVer
27
29
28
- This crate follows [ semver principles ] ( [url]( https://semver.org/)https://semver.org/ ) .
30
+ This crate uses [ semver] ( https://semver.org/ ) versioning .
You can’t perform that action at this time.
0 commit comments