在哪找

微软c标准库中字符串操作源代码

和自甴很熟 提交于 2019-12-10 07:47:19
位置:VC\crt\src (crt C RunTime library) char * strcat(char * dst, const char * src) { char * cp = dst; while(*cp) { cp++; /* find end of dst */ } while (*cp++ = *src++); /* Copy src to end of dst */ return dst; /* return dst */ } char * strcpy(char * dst, const char * src) { char * cp = dst; while (*cp++ = *src++); /* Copy src over dst */ return dst; } char * strchr(const char * string, int ch) { while (*string && *string != (char)ch) { string++; } if (*string == (char)ch; return (char *)string; return NULL; } int strcmp(const char * src, const char * dst) { int ret = 0; while (!(ret = *