当前位置:网站首页>d不要直接用转串
d不要直接用转串
2022-08-04 12:35:00 【fqbqrr】
原文
不要直接用.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符.
}
边栏推荐
猜你喜欢

双目立体视觉学习笔记(一)

鲜花“刺客”收割七夕

Why is Luo Zhenyu's A-share dream so difficult to fulfill?

持续交付(二)PipeLine基本使用

Access Huawei game anti-addiction, click the anti-addiction pop-up window, the game crashes

中电资讯 - 一路“标”升,喜迎Q3开门红

程序猿七夕礼物-如何30分钟给女友快速搭建专属语聊房

双目立体视觉笔记(三)三角测量、极线校正

#夏日挑战赛#OpenHarmony 给你的输入法加点彩—星球崛起

Focus!2022 interview must brush 461 interview questions summary + interview + resume template
随机推荐
双目立体视觉笔记(三)三角测量、极线校正
“蔚来杯“2022牛客暑期多校训练营5 B、C、F、G、H、K
技术分享| 小程序实现音视频通话
C#控制台退出前操作
聚焦数据来源、数据质量和模型性能构建小微企业信用画像
程序猿七夕礼物-如何30分钟给女朋友快速搭建专属语聊房
使用COLMAP初步三维重建
【UML】信息系统分析与设计知识点总结
分布式链路追踪Jaeger + 微服务Pig在Rainbond上的实践分享
Why is Luo Zhenyu's A-share dream so difficult to fulfill?
MATLAB——图像分块
企业应当实施的5个云安全管理策略
Diffusion Models:生成扩散模型
Launcher app prediction
使用SQLServer复制数据库
博云入选 Gartner 中国 DevOps 代表厂商
sqlserver删除重复数据
电源测试之输出动态响应(Output Dynamic Response Test)
Analysis and comparison of mobile cross-end technical solutions
Django框架MySQL数据库到models模型的映射关系