​原文​​​ 不要直接用​​.toString​​,用​​std.format.format​​.

import std;
void main() {
auto x = BigInt("123123123123123123123123123123123123");
string s = format("%s", x); // 给你串表示
writeln(s); // 打印"123123123123123123123123123123123123"

// 转为dchar[]:
dstring ds = s.to!(dchar[]);

// 不用串,直接转为dchar[]
auto app = appender!(dchar[]);
app.formattedWrite("%s","x");
dchar[] dcharArray = app.data; //现在有d符.
}