diff options
| author | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2024-10-30 16:50:55 +0100 |
|---|---|---|
| committer | Arthur Carcano <arthur.carcano@ocamlpro.com> | 2024-10-31 11:55:12 +0100 |
| commit | df445264b3e97cb3e2845f6fbb9ae541225f86cf (patch) | |
| tree | e6753f222805b8c585591d3d46db7c496d61515b | |
| parent | df8c20d7a5ddb84eb1e5fd2c366f51d357306f34 (diff) | |
| download | rust-df445264b3e97cb3e2845f6fbb9ae541225f86cf.tar.gz rust-df445264b3e97cb3e2845f6fbb9ae541225f86cf.zip | |
Add intra-doc link in str::xxx_char_boundary
| -rw-r--r-- | library/core/src/str/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 4c2d43b9ede..208ad9e7e5f 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -211,7 +211,7 @@ impl str { } } - /// Finds the closest `x` not exceeding `index` where `is_char_boundary(x)` is `true`. + /// Finds the closest `x` not exceeding `index` where [`is_char_boundary(x)`] is `true`. /// /// This method can help you truncate a string so that it's still valid UTF-8, but doesn't /// exceed a given number of bytes. Note that this is done purely at the character level @@ -219,6 +219,8 @@ impl str { /// split. For example, the emoji 🧑🔬 (scientist) could be split so that the string only /// includes 🧑 (person) instead. /// + /// [`is_char_boundary(x)`]: Self::is_char_boundary + /// /// # Examples /// /// ``` @@ -247,7 +249,7 @@ impl str { } } - /// Finds the closest `x` not below `index` where `is_char_boundary(x)` is `true`. + /// Finds the closest `x` not below `index` where [`is_char_boundary(x)`] is `true`. /// /// If `index` is greater than the length of the string, this returns the length of the string. /// @@ -255,7 +257,7 @@ impl str { /// for more details. /// /// [`floor_char_boundary`]: str::floor_char_boundary - /// + /// [`is_char_boundary(x)`]: Self::is_char_boundary /// /// # Examples /// |
