Zephyr Project
A Scalable Open Source RTOS for IoT Embedded Devices
string.h
Go to the documentation of this file.
1 /* string.h */
2 
3 /*
4  * Copyright (c) 2014 Wind River Systems, Inc.
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
10 #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
11 
12 #include <stddef.h>
13 #include <bits/restrict.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 extern char *strcpy(char *_MLIBC_RESTRICT d, const char *_MLIBC_RESTRICT s);
20 extern char *strncpy(char *_MLIBC_RESTRICT d, const char *_MLIBC_RESTRICT s,
21  size_t n);
22 extern char *strchr(const char *s, int c);
23 extern char *strrchr(const char *s, int c);
24 extern size_t strlen(const char *s);
25 extern size_t strnlen(const char *s, size_t maxlen);
26 extern int strcmp(const char *s1, const char *s2);
27 extern int strncmp(const char *s1, const char *s2, size_t n);
28 extern char *strtok_r(char *str, const char *sep, char **state);
29 extern char *strcat(char *_MLIBC_RESTRICT dest,
30  const char *_MLIBC_RESTRICT src);
31 extern char *strncat(char *_MLIBC_RESTRICT dest, const char *_MLIBC_RESTRICT src,
32  size_t n);
33 extern char *strstr(const char *s, const char *find);
34 
35 extern size_t strspn(const char *s, const char *accept);
36 extern size_t strcspn(const char *s, const char *reject);
37 
38 extern int memcmp(const void *m1, const void *m2, size_t n);
39 extern void *memmove(void *d, const void *s, size_t n);
40 extern void *memcpy(void *_MLIBC_RESTRICT d, const void *_MLIBC_RESTRICT s,
41  size_t n);
42 extern void *memset(void *buf, int c, size_t n);
43 extern void *memchr(const void *s, int c, size_t n);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_ */
strlen
size_t strlen(const char *s)
memset
void * memset(void *buf, int c, size_t n)
strcmp
int strcmp(const char *s1, const char *s2)
strchr
char * strchr(const char *s, int c)
strcat
char * strcat(char *restrict dest, const char *restrict src)
accept
static int accept(int sock, struct sockaddr *addr, socklen_t *addrlen)
Definition: socket.h:56
strncat
char * strncat(char *restrict dest, const char *restrict src, size_t n)
memchr
void * memchr(const void *s, int c, size_t n)
strcpy
char * strcpy(char *restrict d, const char *restrict s)
strtok_r
char * strtok_r(char *str, const char *sep, char **state)
memcmp
int memcmp(const void *m1, const void *m2, size_t n)
state
state
Definition: http_parser_state.h:30
strncpy
char * strncpy(char *restrict d, const char *restrict s, size_t n)
memmove
void * memmove(void *d, const void *s, size_t n)
strspn
size_t strspn(const char *s, const char *accept)
c
char c
Definition: printk.c:71
restrict.h
_MLIBC_RESTRICT definition
strrchr
char * strrchr(const char *s, int c)
d
irp nz macro MOVR cc d
Definition: asm-macro-32-bit-gnu.h:11
memcpy
void * memcpy(void *restrict d, const void *restrict s, size_t n)
strstr
char * strstr(const char *s, const char *find)
strcspn
size_t strcspn(const char *s, const char *reject)
s
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa s
Definition: asm-macro-32-bit-gnu.h:17
strnlen
size_t strnlen(const char *s, size_t maxlen)
strncmp
int strncmp(const char *s1, const char *s2, size_t n)