We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fe79bd commit 081278eCopy full SHA for 081278e
src/libcore/str/mod.rs
@@ -115,8 +115,8 @@ impl Utf8Error {
115
/// Returns the index in the given string up to which valid UTF-8 was
116
/// verified.
117
///
118
- /// Starting at the index provided, but not necessarily at it precisely, an
119
- /// invalid UTF-8 encoding sequence was found.
+ /// It is the maximum index such that `from_utf8(input[..index])`
+ /// would return `Some(_)`.
120
#[unstable(feature = "utf8_error", reason = "method just added",
121
issue = "27734")]
122
pub fn valid_up_to(&self) -> usize { self.valid_up_to }
0 commit comments