摘要:
D语言标准库中已经有比较好的日志文件实现,默认是把日志输出到标准输入输出,如果需要输入到文件,设置如下: stdThreadLocalLog = new FileLogger("log.txt"); 在执行上面语句后, 使用error,log等函数,都会将日志输出到log.txt文件中。 阅读全文
posted @ 2016-08-07 04:07
honan
阅读(217)
评论(0)
推荐(0)
摘要:
参考https://dlang.org/phobos/std_algorithm.html 在std.algorithm中提供了大量操作Range的函数。一共分为六大类。 一、Searching 搜索 1) all 判断函数,是否集合中所有元素是否都符合条件 auto arr = [1, 3, 5, 7, 9]; auto ret1 = arr.all!(f=> f !=... 阅读全文
posted @ 2016-08-07 02:21
honan
阅读(247)
评论(0)
推荐(0)
浙公网安备 33010602011771号