mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12: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>) {
|
||||
/// Mask of the value bits of a continuation byte
|
||||
const CONT_MASK: u8 = 0b0011_1111u8;
|
||||
|
|
Loading…
Reference in a new issue