2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2018-10-23 10:12:50 +02:00
|
|
|
#pragma once
|
|
|
|
|
2018-10-31 02:09:11 +01:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <sys/types.h>
|
2018-10-23 10:12:50 +02:00
|
|
|
|
2018-10-31 02:09:11 +01:00
|
|
|
__BEGIN_DECLS
|
2018-10-23 10:12:50 +02:00
|
|
|
|
|
|
|
size_t strlen(const char*);
|
2020-01-16 22:11:05 +01:00
|
|
|
size_t strnlen(const char*, size_t maxlen);
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2018-10-26 13:32:13 +02:00
|
|
|
int strcmp(const char*, const char*);
|
2018-11-05 18:16:00 +01:00
|
|
|
int strncmp(const char*, const char*, size_t);
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2018-10-28 09:36:21 +01:00
|
|
|
int memcmp(const void*, const void*, size_t);
|
2018-11-17 15:56:09 +01:00
|
|
|
void* memcpy(void*, const void*, size_t);
|
|
|
|
void* memmove(void*, const void*, size_t);
|
2019-02-03 04:32:31 +01:00
|
|
|
void* memchr(const void*, int c, size_t);
|
2020-07-31 16:26:33 +04:30
|
|
|
const void* memmem(const void* haystack, size_t, const void* needle, size_t);
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2018-10-31 17:50:43 +01:00
|
|
|
void* memset(void*, int, size_t);
|
2021-01-09 20:04:18 +01:00
|
|
|
void explicit_bzero(void*, size_t) __attribute__((nonnull(1)));
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2020-08-13 19:21:54 +03:00
|
|
|
__attribute__((malloc)) char* strdup(const char*);
|
|
|
|
__attribute__((malloc)) char* strndup(const char*, size_t);
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2020-09-12 01:05:00 +02:00
|
|
|
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer"))) char* strcpy(char* dest, const char* src);
|
|
|
|
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer"))) char* strncpy(char* dest, const char* src, size_t);
|
2020-08-25 17:48:52 +03:00
|
|
|
__attribute__((warn_unused_result)) size_t strlcpy(char* dest, const char* src, size_t);
|
|
|
|
|
2018-10-31 10:14:56 +01:00
|
|
|
char* strchr(const char*, int c);
|
2020-02-15 10:58:36 +13:00
|
|
|
char* strchrnul(const char*, int c);
|
2018-11-11 20:42:41 +01:00
|
|
|
char* strstr(const char* haystack, const char* needle);
|
2018-10-31 17:50:43 +01:00
|
|
|
char* strrchr(const char*, int c);
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2020-09-12 01:05:00 +02:00
|
|
|
__attribute__((deprecated("use strncat"))) char* strcat(char* dest, const char* src);
|
|
|
|
char* strncat(char* dest, const char* src, size_t);
|
2020-08-25 17:48:52 +03:00
|
|
|
|
2018-10-31 17:50:43 +01:00
|
|
|
size_t strspn(const char*, const char* accept);
|
|
|
|
size_t strcspn(const char*, const char* reject);
|
2021-05-24 16:43:12 +02:00
|
|
|
int strerror_r(int, char*, size_t);
|
2018-11-05 14:50:41 +01:00
|
|
|
char* strerror(int errnum);
|
2018-11-06 15:45:16 +01:00
|
|
|
char* strsignal(int signum);
|
2019-02-08 02:38:21 +01:00
|
|
|
char* strpbrk(const char*, const char* accept);
|
2019-11-10 16:24:52 +01:00
|
|
|
char* strtok_r(char* str, const char* delim, char** saved_str);
|
2019-05-28 11:53:16 +02:00
|
|
|
char* strtok(char* str, const char* delim);
|
|
|
|
int strcoll(const char* s1, const char* s2);
|
|
|
|
size_t strxfrm(char* dest, const char* src, size_t n);
|
2018-10-23 10:12:50 +02:00
|
|
|
|
2018-10-31 02:09:11 +01:00
|
|
|
__END_DECLS
|