(&self, range: ops::Range<usize>)
| 1209 | #[inline] |
| 1210 | #[track_caller] |
| 1211 | fn index(&self, range: ops::Range<usize>) -> &Wtf8 { |
| 1212 | // is_code_point_boundary checks that the index is in [0, .len()] |
| 1213 | if range.start <= range.end |
| 1214 | && is_code_point_boundary(self, range.start) |
| 1215 | && is_code_point_boundary(self, range.end) |
| 1216 | { |
| 1217 | unsafe { slice_unchecked(self, range.start, range.end) } |
| 1218 | } else { |
| 1219 | slice_error_fail(self, range.start, range.end) |
| 1220 | } |
| 1221 | } |
| 1222 | } |
| 1223 | |
| 1224 | /// Returns a slice of the given string from byte `begin` to its end. |
nothing calls this directly
no test coverage detected