str: Correct documentation on is_char_boundary
Documentation claims it panics on out of bounds -- it regards out of bounds as just not a char boundary. core::str module is aware of how it works and uses it appropriately. Maybe we should rename it to `is_valid_index`, `is_slicable_index`, or something similar.
This commit is contained in:
parent
0da69969d1
commit
c5a0a73253
1 changed files with 1 additions and 3 deletions
|
|
@ -483,9 +483,7 @@ impl str {
|
|||
/// considered to be
|
||||
/// boundaries.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if `index` is greater than `self.len()`.
|
||||
/// Returns `false` if `index` is greater than `self.len()`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue