Serenity Operating System
1/*
2 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#pragma once
28
29#include <sys/cdefs.h>
30#include <sys/types.h>
31
32__BEGIN_DECLS
33
34size_t strlen(const char*);
35size_t strnlen(const char*, size_t maxlen);
36int strcmp(const char*, const char*);
37int strncmp(const char*, const char*, size_t);
38int strcasecmp(const char*, const char*);
39int strncasecmp(const char*, const char*, size_t);
40int memcmp(const void*, const void*, size_t);
41void* memcpy(void*, const void*, size_t);
42void* memmove(void*, const void*, size_t);
43void* memchr(const void*, int c, size_t);
44void bzero(void*, size_t);
45void bcopy(const void*, void*, size_t);
46void* memset(void*, int, size_t);
47char* strdup(const char*);
48char* strndup(const char*, size_t);
49char* strcpy(char* dest, const char* src);
50char* strncpy(char* dest, const char* src, size_t);
51char* strchr(const char*, int c);
52char* strchrnul(const char*, int c);
53char* strstr(const char* haystack, const char* needle);
54char* strrchr(const char*, int c);
55char* strcat(char* dest, const char* src);
56char* strncat(char* dest, const char* src, size_t);
57size_t strspn(const char*, const char* accept);
58size_t strcspn(const char*, const char* reject);
59char* strerror(int errnum);
60char* strsignal(int signum);
61char* strpbrk(const char*, const char* accept);
62char* strtok_r(char* str, const char* delim, char** saved_str);
63char* strtok(char* str, const char* delim);
64int strcoll(const char* s1, const char* s2);
65size_t strxfrm(char* dest, const char* src, size_t n);
66
67__END_DECLS