字符串函数
几个常见字符串处理函数
- /* *
- * str开头的函数部分
- * In the following functions, variables s and t are of type char *;
- * cs and ct are of type const char *; n is of type size_t;
- * and c is an int converted to char.
- */
- // strcpy - copy string ct to string s, including '\0'; return s.
- char *strcpy(char *s, const char *ct)
- {
- char *tmp = s;
- while ((*tmp++ = *ct++) != '\0')
- /* nothing */;
- return s;
- }
- <a href="http://www.juliuschen.com/archives/18.html#more-18" class="more-link">继续阅读 »</a>