aicongli-829/tokei/counter does not have a README file

    Counts

    pub(all) struct Counts {
    files : Int
    lines : Int
    code : Int
    comments : Int
    blanks : Int
    blobs : Map[String, Counts]
    }

    Counting result for a set of files of one language.

    Counts::add

    fn Counts::add(self : Counts, other : Counts) -> Unit

    Counts::copy

    fn Counts::copy(self : Counts) -> Counts

    Aggregation must not mutate a per-file report that shares this value.

    Counts::new

    fn Counts::new() -> Counts

    count_bytes

    fn count_bytes(lang :
    LangDef
    , bytes : Bytes) -> Counts?

    Count lines from raw bytes: detects binary files (NUL byte in the first 8 KiB, like tokei) and returns None for them.

    count_source

    fn count_source(lang :
    LangDef
    , source : String) -> Counts

    Count lines of a full source text for lang.

    utf8_decode

    fn utf8_decode(bytes : Bytes) -> String

    Decode UTF-8 bytes to a MoonBit String (UTF-16), lossy: invalid sequences become U+FFFD, like most modern tools.

    Source Files