会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
jz_cnblogs
博客园
首页
新随笔
联系
管理
订阅
2016年3月11日
c++的c风格字符串函数的实现
摘要: 要注意使用断言判断传入的字符串非空。 1 #include <cassert> 2 3 //求字符串长度 4 size_t StrLen(const char *str) 5 { 6 assert(str != nullptr); 7 size_t len = 0; 8 while (*str++
阅读全文
posted @ 2016-03-11 21:37 jz_cnblogs
阅读(366)
评论(0)
推荐(0)
编辑
公告