char str[80]; strcpy (str,"these "); strcat (str,"strings ")
//以下為原始碼
char *
strcat(char * __restrict s, const char * __restrict append)
{
char *save = s;
for (; *s; ++s);
while ((*s++ = *append++));
return(save);
}
strncat 用來串接指定多少字元
strncmp比較字串前兩個字元是否相同,如果相同則印出
strstr(s1, s2)傳回 s2 字串在 s1字串中第一次出現的位置
strlen(s1)傳回 s1 的長度(不含 '\0' 字元)
strrev(s1)將 s1 字串倒置
沒有留言:
張貼留言