2014年4月2日

c语言实现常见字符串函数strchr strstr strcmp atoi itoi(字符串换成整数)

摘要: 好久没有更新博客了,刚刚出炉练练手的程序如下,很简单,没有考虑过多复杂的东西,有好的想法,欢迎指教:字符查找函数:char *my_strchr(const char *s,int c){ char *pTemp = s; do { if(*pTemp == c) { return pTemp; } } while(*pTemp++); return NULL;}字符串比较函数:int my_strcmp(const char *s1,const char *s2){ char *pTem... 阅读全文

posted @ 2014-04-02 19:24 净坛使者 阅读(1070) 评论(0) 推荐(0) 编辑

导航