From 80a8df388d3bce54c6bcd2fcebc6de37cf563815 Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Wed, 13 Nov 2024 13:52:24 -0600 Subject: [PATCH] string-offsets: Post-publish README editing pass --- crates/string-offsets/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/string-offsets/README.md b/crates/string-offsets/README.md index 7ad8c23..baaa242 100644 --- a/crates/string-offsets/README.md +++ b/crates/string-offsets/README.md @@ -4,10 +4,10 @@ Converts string offsets between UTF-8 bytes, UTF-16 code units, Unicode code poi Rust strings are UTF-8, but JavaScript has UTF-16 strings, and in Python, strings are sequences of Unicode code points. It's therefore necessary to adjust string offsets when communicating across -programming language boundaries. [`StringOffsets`] does these adjustments. +programming language boundaries. `StringOffsets` does these adjustments. Each `StringOffsets` instance contains offset information for a single string. [Building the data -structure](StringOffsets::new) takes O(n) time and memory, but then most conversions are O(1). +structure](https://docs.rs/string-offsets/latest/string_offsets/struct.StringOffsets.html#method.new) takes O(n) time and memory, but then most conversions are O(1). ["UTF-8 Conversions with BitRank"](https://adaptivepatchwork.com/2023/07/10/utf-conversion/) is a blog post explaining the implementation.