Add intra-doc link in str::xxx_char_boundary · qinheping/verify-rust-std@f0634f0 (original) (raw)
`@@ -211,14 +211,16 @@ impl str {
`
211
211
`}
`
212
212
`}
`
213
213
``
214
``
`` -
/// Finds the closest x
not exceeding index
where is_char_boundary(x)
is true
.
``
``
214
`` +
/// Finds the closest x
not exceeding index
where [is_char_boundary(x)
] is true
.
``
215
215
`///
`
216
216
`/// This method can help you truncate a string so that it's still valid UTF-8, but doesn't
`
217
217
`/// exceed a given number of bytes. Note that this is done purely at the character level
`
218
218
`/// and can still visually split graphemes, even though the underlying characters aren't
`
219
219
`/// split. For example, the emoji 🧑🔬 (scientist) could be split so that the string only
`
220
220
`/// includes 🧑 (person) instead.
`
221
221
`///
`
``
222
`` +
/// [is_char_boundary(x)
]: Self::is_char_boundary
``
``
223
`+
///
`
222
224
`/// # Examples
`
223
225
`///
`
224
226
```` /// ```
````
`@@ -247,15 +249,15 @@ impl str {
`
247
249
`}
`
248
250
`}
`
249
251
``
250
``
`` -
/// Finds the closest x
not below index
where is_char_boundary(x)
is true
.
``
``
252
`` +
/// Finds the closest x
not below index
where [is_char_boundary(x)
] is true
.
``
251
253
`///
`
252
254
`` /// If index
is greater than the length of the string, this returns the length of the string.
``
253
255
`///
`
254
256
`` /// This method is the natural complement to [floor_char_boundary
]. See that method
``
255
257
`/// for more details.
`
256
258
`///
`
257
259
`` /// [floor_char_boundary
]: str::floor_char_boundary
``
258
``
`-
///
`
``
260
`` +
/// [is_char_boundary(x)
]: Self::is_char_boundary
``
259
261
`///
`
260
262
`/// # Examples
`
261
263
`///
`