mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
Add rustdoc comment.
This commit is contained in:
parent
13762cae05
commit
417ad0e384
1 changed files with 7 additions and 0 deletions
|
@ -135,6 +135,13 @@ pub(crate) fn count_bytes_and_lines_fast<R: Read>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a WordCount that counts the number of Unicode characters encoded in UTF-8 read via a Reader.
|
||||||
|
///
|
||||||
|
/// This corresponds to the `-m` command line flag to wc.
|
||||||
|
///
|
||||||
|
/// # Arguments
|
||||||
|
///
|
||||||
|
/// * `R` - A Reader from which the UTF-8 stream will be read.
|
||||||
pub(crate) fn count_chars_fast<R: Read>(handle: &mut R) -> (WordCount, Option<io::Error>) {
|
pub(crate) fn count_chars_fast<R: Read>(handle: &mut R) -> (WordCount, Option<io::Error>) {
|
||||||
/// Mask of the value bits of a continuation byte
|
/// Mask of the value bits of a continuation byte
|
||||||
const CONT_MASK: u8 = 0b0011_1111u8;
|
const CONT_MASK: u8 = 0b0011_1111u8;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue