cwc

Crates.iocwc
lib.rscwc
version1.0.2
created_at2025-04-27 11:16:42.53117+00
updated_at2025-04-29 10:16:59.540515+00
descriptionA word counter utility that properly handles CJK and Unicode text
homepage
repositoryhttps://github.com/eli-yip/cwc
max_upload_size
id1651024
size6,966
Jason1 (eli-yip)

documentation

README

Word Counter

A simple command-line utility written in Rust that counts words in text files, with proper support for CJK characters.

Features

  • Properly counts words in text containing CJK characters, ignoring punctuation marks.
  • Supports reading from files or stdin (pipe)
  • Can process multiple files at once

Installation

cargo install cwc

Usage

Count words in a file:

cwc filename.txt

Count words in multiple files:

cwc file1.txt file2.txt file3.txt

Count words from stdin (pipe):

cat file.txt | cwc

OR

echo "Some text to count" | cwc

Display version:

cwc -v
Commit count: 2

cargo fmt