Unnamed repository; edit this file 'description' to name the repository.
line-index: Update README.md with suggestions
Co-authored-by: LaurenČ›iu Nicola <[email protected]>
homersimpsons 2024-01-07
parent 747fa7d · commit 0f69276
-rw-r--r--lib/line-index/README.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/line-index/README.md b/lib/line-index/README.md
index c0d310c857..93ac03696a 100644
--- a/lib/line-index/README.md
+++ b/lib/line-index/README.md
@@ -1,8 +1,8 @@
# line-index
-This crate is developped as part of `rust-analyzer`.
+This crate is developed as part of `rust-analyzer`.
-line-index is a library to convert between text offset and its corresponding line/column.
+line-index is a library to convert between text offsets and corresponding line/column coordinates.
## Installation
@@ -10,7 +10,9 @@ To add this crate to a project simply run `cargo add line-index`.
## Usage
-The main structure is `LineIndex`. It is constructed with an utf-8 text then various utility functions can be used on it.
+The main structure is `LineIndex`.
+
+It is constructed with an UTF-8 string, but also supports UTF-16 and UTF-32 offsets.
### Example
@@ -25,4 +27,4 @@ line_index.offset(LineCol { line: 2, col: 3 }); // Some (24)
## SemVer
-This crate follows [semver principles]([url](https://semver.org/)https://semver.org/).
+This crate uses [semver](https://semver.org/) versioning.