rust/library/core/src/str
bors cb81dc535c Auto merge of #82585 - TrolledWoods:master, r=dtolnay
Added CharIndices::offset function

The CharIndices iterator has a field internally called front_offset, that I think would be very useful to have access to.

You can already do something like ``char_indices.next().map(|(offset, _)| offset)``, but that is wordy, in addition to not handling the case where the iterator has ended, where you'd want the offset to be equal to the length.

I'm very new to the open source world and the rust repository, so I'm sorry if I missed a step or did something weird.
2021-04-23 02:48:13 +00:00
..
converts.rs Convert primitives to use intra-doc links 2021-02-25 20:31:53 -05:00
error.rs Add #[inline] to the Utf8Error accessors. 2020-10-18 15:38:32 +02:00
iter.rs Auto merge of #82585 - TrolledWoods:master, r=dtolnay 2021-04-23 02:48:13 +00:00
lossy.rs Move utf-8 validating helpers to new mod 2020-09-26 05:20:53 +00:00
mod.rs Update char::escape_debug_ext to handle different escapes in strings vs. chars 2021-03-26 11:23:51 +03:00
pattern.rs Fixed some intra-docs links in library/core 2020-09-18 07:49:29 +08:00
traits.rs Convert the rest of the standard library primitives to intra-doc links 2021-02-25 20:32:49 -05:00
validations.rs Remove semicolon from internal err macro 2020-11-18 23:10:35 -05:00