blu*_*m91 1 string d words count
我是使用D的新手,我想要求一个将字符串分解为单词的简单方法的帮助.我的程序从文件中获取文本,并且应该计算该文本中的单词数.
eco*_*eco 7
splitter并且walkLength能够做到这一点.
splitter
walkLength
void main() { import std.stdio, std.algorithm, std.range, std.file; writeln(readText("file.txt").splitter.walkLength()); }
归档时间:
9 年 前
查看次数:
77 次
最近记录: