forked from Bananymous/banan-os
parent
c62e820bcf
commit
071da18fa3
|
@ -20,6 +20,7 @@ char* stpcpy(char* __restrict s1, const char* __restrict s2);
|
||||||
char* stpncpy(char* __restrict s1, const char* __restrict s2, size_t n);
|
char* stpncpy(char* __restrict s1, const char* __restrict s2, size_t n);
|
||||||
char* strcat(char* __restrict s1, const char* __restrict s2);
|
char* strcat(char* __restrict s1, const char* __restrict s2);
|
||||||
char* strchr(const char* s, int c);
|
char* strchr(const char* s, int c);
|
||||||
|
char* strchrnul(const char* s, int c);
|
||||||
int strcmp(const char* s1, const char* s2);
|
int strcmp(const char* s1, const char* s2);
|
||||||
int strcoll(const char* s1, const char* s2);
|
int strcoll(const char* s1, const char* s2);
|
||||||
int strcoll_l(const char* s1, const char* s2, locale_t locale);
|
int strcoll_l(const char* s1, const char* s2, locale_t locale);
|
||||||
|
|
|
@ -303,6 +303,17 @@ char* strchr(const char* str, int c)
|
||||||
return (*str == c) ? (char*)str : nullptr;
|
return (*str == c) ? (char*)str : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* strchrnul(const char* str, int c)
|
||||||
|
{
|
||||||
|
while (*str)
|
||||||
|
{
|
||||||
|
if (*str == c)
|
||||||
|
return (char*)str;
|
||||||
|
str++;
|
||||||
|
}
|
||||||
|
return (char*)str;
|
||||||
|
}
|
||||||
|
|
||||||
char* strncpy(char* __restrict__ dest, const char* __restrict__ src, size_t n)
|
char* strncpy(char* __restrict__ dest, const char* __restrict__ src, size_t n)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
Loading…
Reference in New Issue