# 命令行文本计数统计程序 **Repository Path**: later-nicknames-shid/Command-line-text-count-statistics-program ## Basic Information - **Project Name**: 命令行文本计数统计程序 - **Description**: 实现一个命令行文本计数统计程序。能正确统计导入的纯英文txt文本中的字符数,单词数,句子数。扩展功能(加分项):统计代码行、空行、注释行等,并提供相应命令接口。 - **Primary Language**: C++ - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-11-03 - **Last Updated**: 2023-03-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 命令行文本计数统计程序 #### 介绍 该项目实现了一个命令行文本计数统计程序。基础功能为能正确统计导入的纯英文txt文本中的字符数,单词数,句子数。扩展功能为统计代码行、空行、注释行等,并提供相应命令接口。 #### 文件介绍 ##### 1. [v0.1_empty](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/tree/master/v0.1_empty) 空项目 ##### 2. [v0.2_basis](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/tree/master/v0.2_basis) 实现基础功能项目的相关文件 - [txtfile_v0.2.txt](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.2_basis/txtfile_v0.2.txt) 用于测试程序的.txt文件 - [v0.2_basis.cpp](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.2_basis/v0.2_basis.cpp) v0.2_basis程序代码 - [v0.2_basis.exe](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.2_basis/v0.2_basis.exe) v0.2_basis程序 - [v0.2_basis_test.md](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.2_basis/v0.2_basis_test.md) v0.2_basis程序测试结果 ##### 3. [v0.3_expand](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/tree/master/v0.3_expand) 实现基础+扩展功能项目的相关文件 - [txtfile_v0.3.txt](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.3_expand/txtfile_v0.3.txt) 用于测试程序的.txt文件 - [v0.3_expand.cpp](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.3_expand/v0.3_expand.cpp) v0.3_expand程序代码 - [v0.3_expand.exe](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.3_expand/v0.3_expand.exe) v0.3_expand程序 - [v0.3_expand_test.md](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.3_expand/v0.3_expand_test.md) v0.3_expand程序测试结果 ##### 4. README.md 项目说明 #### 使用说明 程序使用方式为: ``` 程序名.exe 命令 需统计文件名.txt ``` 具体使用例子可参考[v0.2_basis_test.md](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.2_basis/v0.2_basis_test.md)或[v0.3_expand_test.md](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.3_expand/v0.3_expand_test.md) #### 程序运行 例程运行及其相关结果见[v0.2_basis_test.md](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.2_basis/v0.2_basis_test.md)和[v0.3_expand_test.md](https://gitee.com/later-nicknames-shid/Command-line-text-count-statistics-program/blob/master/v0.3_expand/v0.3_expand_test.md) #### 命令说明 **注:前三项为v0.2_basis.exe与v0.3_expand.exe均具有的功能,后三项为v0.3_expand.exe单独具有的功能。** - `-c`:统计字符数(包含空格) - `-w`:统计单词数 - `-s`:统计句子数 - `-cdl`:统计代码行 - `-bkl`:统计空行 - `-cml`:统计注释行(目前仅考虑到`//`和`/* */`两种类型的注释)