Make strstr take a const char* as a needle instead of a char*
This commit is contained in:
parent
0b278b2be2
commit
18140a55ec
@ -11,7 +11,7 @@ char* strncpy(char* dest, const char* src, size_t n);
|
||||
int strncmp(const char* a, const char* b, size_t n);
|
||||
char* strncat(char* dest, const char* src, size_t n);
|
||||
|
||||
char* strstr(char* haystack, char* needle);
|
||||
char* strstr(char* haystack, const char* needle);
|
||||
|
||||
void* memcpy(void* dest, const void* src, size_t n);
|
||||
void* memset(void* dest, int c, size_t n);
|
||||
|
@ -66,7 +66,7 @@ char* strcat(char* dest, const char* src)
|
||||
return dest;
|
||||
}
|
||||
|
||||
char* strstr(char* haystack, char* needle)
|
||||
char* strstr(char* haystack, const char* needle)
|
||||
{
|
||||
size_t needle_size = strlen(needle);
|
||||
size_t haystack_size = strlen(haystack);
|
||||
|
Loading…
Reference in New Issue
Block a user