mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add intra-doc link in str::xxx_char_boundary
This commit is contained in:
parent
df8c20d7a5
commit
df445264b3
@ -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
|
/// 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
|
/// 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
|
/// split. For example, the emoji 🧑🔬 (scientist) could be split so that the string only
|
||||||
/// includes 🧑 (person) instead.
|
/// includes 🧑 (person) instead.
|
||||||
///
|
///
|
||||||
|
/// [`is_char_boundary(x)`]: Self::is_char_boundary
|
||||||
|
///
|
||||||
/// # Examples
|
/// # 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.
|
/// 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.
|
/// for more details.
|
||||||
///
|
///
|
||||||
/// [`floor_char_boundary`]: str::floor_char_boundary
|
/// [`floor_char_boundary`]: str::floor_char_boundary
|
||||||
///
|
/// [`is_char_boundary(x)`]: Self::is_char_boundary
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user