摘要: 前几天遇到一个有意思的问题,实现strlen 不考虑线程安全:下面是我的实现:1 size_t strlen(const char* s)2 {3 const char* p = s;4 while (*p++);5 return p-1-s;6 }Glibc 2.19 的实... 阅读全文
posted @ 2014-07-27 13:03 Yuangui 阅读(282) 评论(0) 推荐(0) 编辑