1 // Copyright 2016 The Fuchsia Authors 2 // Copyright (c) 2008 Travis Geiselbrecht 3 // 4 // Use of this source code is governed by a MIT-style 5 // license that can be found in the LICENSE file or at 6 // https://opensource.org/licenses/MIT 7 8 #pragma once 9 10 #include <stddef.h> 11 #include <zircon/compiler.h> 12 13 __BEGIN_CDECLS 14 15 void *memchr (void const *, int, size_t) __PURE; 16 int memcmp (void const *, const void *, size_t) __PURE; 17 void *memcpy (void *, void const *, size_t); 18 void *memmove(void *, void const *, size_t); 19 void *memset (void *, int, size_t); 20 21 char *strcat(char *, char const *); 22 char *strchr(char const *, int) __PURE; 23 int strcmp(char const *, char const *) __PURE; 24 char *strcpy(char *, char const *); 25 size_t strlen(char const *) __PURE; 26 char *strncat(char *, char const *, size_t); 27 int strncmp(char const *, char const *, size_t) __PURE; 28 char *strncpy(char *, char const *, size_t); 29 char *strpbrk(char const *, char const *) __PURE; 30 char *strrchr(char const *, int) __PURE; 31 size_t strspn(char const *, char const *) __PURE; 32 size_t strcspn(const char *s, const char *) __PURE; 33 char *strstr(char const *, char const *) __PURE; 34 char *strtok(char *, char const *); 35 int strcoll(const char *s1, const char *s2) __PURE; 36 size_t strxfrm(char *dest, const char *src, size_t n) __PURE; 37 38 // Not actually defined in the kernel, but <cstring> expects the declaration. 39 char *strerror(int); 40 41 /* non standard */ 42 size_t strlcat(char *, char const *, size_t); 43 size_t strlcpy(char *, char const *, size_t); 44 int strncasecmp(char const *, char const *, size_t) __PURE; 45 int strnicmp(char const *, char const *, size_t) __PURE; 46 size_t strnlen(char const *s, size_t count) __PURE; 47 48 __END_CDECLS 49