D语言字符串长度

import std.stdio;  

void main(string[] args) { 
   string greeting1 = "Good"; 
   writefln("Length of string greeting1 is %d",greeting1.length); 

   char[] greeting2 = "morning".dup;        
   writefln("Length of string greeting2 is %d",greeting2.length); 
}

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/265987.html

(0)
上一篇 2022年6月7日 21:38
下一篇 2022年6月7日 21:38

相关推荐

发表回复

登录后才能评论