2 回答

TA貢獻1831條經(jīng)驗 獲得超10個贊
當(dāng)然有:
#include <string.h>
char *strstr(const char *haystack, const char *needle);
Return
It returns a pointer into the string haystack that is the first character of
the substring, or a null pointer if no match was found. If needle is an empty
string, the function returns haystack.
Description
This is like strchr() , except that it searches haystack for a substring
needle rather than just a single character.
順便,如果你自己寫不出這樣的函數(shù),不建議你繼續(xù)學(xué)習(xí)C。

TA貢獻1813條經(jīng)驗 獲得超2個贊
沒有,有這個函數(shù)
char *strchr(cs, c)
return pointer to first occurrence of c in cs or NULL if not present
- 2 回答
- 0 關(guān)注
- 89 瀏覽
添加回答
舉報