cwc 1.0.0

A word counter utility that properly handles CJK and Unicode text
cwc-1.0.0 is not a library.

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:

word_counter filename.txt

Count words in multiple files:

word_counter file1.txt file2.txt file3.txt

Count words from stdin (pipe):

cat file.txt | word_counter

OR

echo "Some text to count" | word_counter

Display version:

word_counter -v