crazyjixiangcrzybaby.blog.chinaunix.net
crazyjixiang
全部博文(19)
emacs(0)
vim(0)
2011年(1)
2009年(18)
wxudong1
分类: C/C++
2009-11-11 16:17:19
//strncpy char *strncpy(char *dst, const char *src, size_t count) { assert((dst != NULL) && (src != NULL )); char *tmp = dst; tmp[count+1]='\0'; while (count-- && (*(dst++) = *(src++))!='\0') { ;//nothing } return tmp; }
上一篇:linux输出输入宽字符
下一篇:一段不错的代码,分享下
登录 注册