File tree 1 file changed +17
-2
lines changed
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -1475,12 +1475,27 @@ pub trait StrSlice<'a> {
1475
1475
/// This function can be used to iterate over a unicode string in reverse.
1476
1476
///
1477
1477
/// Returns 0 for next index if called on start index 0.
1478
+ ///
1479
+ /// # Failure
1480
+ ///
1481
+ /// If `i` is greater than the length of the string.
1482
+ /// If `i` is not an index following a valid UTF-8 character.
1478
1483
fn char_range_at_reverse ( & self , start : uint ) -> CharRange ;
1479
1484
1480
- /// Plucks the character starting at the `i`th byte of a string
1485
+ /// Plucks the character starting at the `i`th byte of a string.
1486
+ ///
1487
+ /// # Failure
1488
+ ///
1489
+ /// If `i` is greater than or equal to the length of the string.
1490
+ /// If `i` is not the index of the beginning of a valid UTF-8 character.
1481
1491
fn char_at ( & self , i : uint ) -> char ;
1482
1492
1483
- /// Plucks the character ending at the `i`th byte of a string
1493
+ /// Plucks the character ending at the `i`th byte of a string.
1494
+ ///
1495
+ /// # Failure
1496
+ ///
1497
+ /// If `i` is greater than the length of the string.
1498
+ /// If `i` is not an index following a valid UTF-8 character.
1484
1499
fn char_at_reverse ( & self , i : uint ) -> char ;
1485
1500
1486
1501
/// Work with the byte buffer of a string as a byte slice.
You can’t perform that action at this time.
0 commit comments