kdam 0.6.4

A console progress bar library for Rust. (inspired by tqdm & rich.progress)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Returns floor division and modulus of two values.
pub(super) fn divmod(x: usize, y: usize) -> (usize, usize) {
    (x / y, x % y)
}

/// Returns length of the given text.
#[cfg(feature = "unicode")]
pub(super) fn len(text: &str) -> usize {
    unicode_width::UnicodeWidthStr::width(text)
}

/// Returns length of the given text.
#[cfg(not(feature = "unicode"))]
pub(super) fn len(text: &str) -> usize {
    text.chars().count()
}