D 语言2.0
编程参考手册
(中文版 下册)
张雪平 译 著
2011.08
版权声明
● 本电子书纯为宣传和推广 D 语言而作,不具任何商业目的。
● 本译稿可供大家免费阅读、在网上自由传播,但切勿擅自更改或用作任何形式的商业
用途。如有必要,须事先征得译作者的同意。
● 请大家尊重知识产权、尊重译作者的劳动成果。
● 本译稿的原稿来自 DMD 官方手册,在翻译过程中有参考前人的译作。
● 原稿版权归 Digital Mars 所有,译作者拥有本译稿所有版权。
前 言
本电子书的制作源自 Digital Mars 官方的 DMD 手册,基于 DMD 2.054。由于原手册是
html 文档,因此在整个版面风格上还不尽统一,待 DMD 发行版相对稳定后,再来统一调整、
美化版面。由于 DMD 2.0 本身还在不断的发展,相应的手册也随时在更新,希望中文手册
能够帮助大家更好地学习 DMD 2.0!
如果您在阅读的过程中发现有任何错漏,欢迎来信指正。
本书的下载地址:http://bitworld.tht.cmded.net/wordpress/ 以及 http://bitworld.ys168.com
不完全网页版地址:http://bitworld.tht.cmded.net/d/manual/
QQ 交流群:47514066,8399665
感 谢
感谢 Digital Mars 无私提供英文原稿
感谢 Walter Bright 发明了 D 语言,让我有机会可以翻译这份文档
感谢 www.dnaic.com 提供了部分翻译参考,详见:
http://www.dnaic.com/d/doc/d/index.html
感谢 www.OpenOffice.org 提供的 OpenOffice.org,这是一套功能强大免费的办公软件
感谢在我身边不断支持我的家人、朋友、同学以及各位热心的网友
感谢自己仍保持了热情且继续翻译、更新下去
作者简介
张雪平,模式识别与智能系统专业;个人兴趣:D 语言编程、应用系统开发
➢ QQ: 85976988 ICQ: 56-1981-07
➢
➢ E-Mail: zxpmyth@yahoo.com.cn
➢
➢ Phone: 15214327130
➢
➢ Blog: http://bitworld.tht.cmded.net/wordpress/
附言:
本作品的完善需要您无私的帮助与慷慨捐助。
捐款账号:6227 0012 1848 0138 932 (中国建设银行 上海)
更新记录
☑2008.10 初始版本
☑2009.05 少量新章节,更多错误更正、补充翻译,改善章节编号
☑2009.10 基于 DMD 2.033,少量内容更新;增加第17、18章
☑2009.11 基于 DMD 2.036,少量语句翻译调整;水印调整
☑2010.07 基于 DMD 2.047,添加大量库参考调整
☑2010.08 基于 DMD 2.048,添加、更新部分参考章节,修正部分翻译内容
☑2011.08 基于 DMD 2.054,改进及修正大量翻译,新增大量参考库文档
目 录
第五篇 Phobos 库参考...........................................................1
第 1 章 Phobos 运行库..........................................................1
1.1 宗旨....................................................................1
1.2 导入(Imports).............................................................1
1.3 std.c.stdio................................................................4
第 2 章 object..................................................................5
第 3 章 std.algorithm..........................................................11
第 4 章 std.array..............................................................41
第 5 章 std.base64.............................................................47
第 6 章 std.bigint..............................................................55
第 7 章 std.bind...............................................................59
第 8 章 std.bitmanip...........................................................63
第 9 章 std.compiler...........................................................67
第 10 章 std.complex...........................................................69
第 11 章 std.concurrency.......................................................71
第 12 章 std.container..........................................................75
第 13 章 std.conv..............................................................97
第 14 章 std.cpuid............................................................103
第 15 章 std.ctype............................................................107
第 16 章 std.date.............................................................109
第 17 章 std.datetime.........................................................115
第 18 章 std.demangle.........................................................229
第 19 章 std.encoding.........................................................231
第 20 章 std.exception.........................................................243
第 21 章 std.file..............................................................249
第 22 章 std.format...........................................................263
第 23 章 std.functional........................................................271
第 24 章 core.memory.........................................................275
第 25 章 std.getopt...........................................................281
第 26 章 std.json.............................................................289
第 27 章 std.math............................................................290
第 28 章 std.mathspecial.......................................................311
第 29 章 std.md5.............................................................315
第 30 章 std.metastrings.......................................................317
第 31 章 std.mmfile...........................................................319
第 32 章 std.numeric..........................................................321
第 33 章 std.outbuffer.........................................................331
第 34 章 std.path.............................................................333
第 35 章 std.parallelism.......................................................343
第 36 章 std.process..........................................................359
第 37 章 std.random..........................................................361
第 38 章 std.range............................................................369
1