MOS Source Code
Loading...
Searching...
No Matches
mos_string.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2#pragma once
3
4#include <mos/moslib_global.h>
5#include <mos/types.h>
6
14MOSAPI size_t strlen(const char *str) __pure;
15MOSAPI size_t strnlen(const char *, size_t);
16MOSAPI s32 strcmp(const char *str1, const char *str2);
17MOSAPI s32 strncmp(const char *str1, const char *str2, size_t n);
18MOSAPI s32 strncasecmp(const char *str1, const char *str2, size_t n);
19
20// ! The memory areas must not overlap.
21MOSAPI void *memcpy(void *__restrict dest, const void *__restrict src, size_t n);
22MOSAPI void *memmove(void *dest, const void *src, size_t n);
23MOSAPI void *memset(void *s, int c, size_t n);
24MOSAPI int memcmp(const void *s1, const void *s2, size_t n);
25MOSAPI void memzero(void *s, size_t n);
26MOSAPI void *memchr(const void *m, int c, size_t n);
27
28MOSAPI char *strcpy(char *__restrict dest, const char *__restrict src);
29MOSAPI char *strcat(char *__restrict dest, const char *__restrict src);
30
31MOSAPI char *strncpy(char *__restrict dest, const char *__restrict src, size_t n);
32
33MOSAPI char *strdup(const char *src);
34MOSAPI char *strndup(const char *src, size_t n);
35
36MOSAPI char *strchr(const char *s, int c);
37MOSAPI char *strrchr(const char *s, int c);
38
39MOSAPI size_t strspn(const char *s, const char *accept);
40MOSAPI char *strpbrk(const char *s, const char *accept);
41MOSAPI char *strtok(char *str, const char *delim);
42MOSAPI char *strtok_r(char *str, const char *delim, char **saveptr);
MOSAPI char * strcat(char *__restrict dest, const char *__restrict src)
Definition mos_string.c:192
MOSAPI void * memset(void *s, int c, size_t n)
Definition mos_string.c:134
MOSAPI char * strchr(const char *s, int c)
Definition mos_string.c:236
MOSAPI void * memchr(const void *m, int c, size_t n)
Definition mos_string.c:173
MOSAPI char * strtok(char *str, const char *delim)
Definition mos_string.c:281
MOSAPI size_t strspn(const char *s, const char *accept)
Definition mos_string.c:258
MOSAPI char * strcpy(char *__restrict dest, const char *__restrict src)
Definition mos_string.c:184
MOSAPI s32 strncasecmp(const char *str1, const char *str2, size_t n)
Definition mos_string.c:47
MOSAPI char * strrchr(const char *s, int c)
Definition mos_string.c:247
MOSAPI char * strdup(const char *src)
MOSAPI char * strncpy(char *__restrict dest, const char *__restrict src, size_t n)
Definition mos_string.c:202
MOSAPI int memcmp(const void *s1, const void *s2, size_t n)
Definition mos_string.c:142
MOSAPI void * memcpy(void *__restrict dest, const void *__restrict src, size_t n)
Definition mos_string.c:64
MOSAPI size_t strlen(const char *str) __pure
Definition mos_string.c:8
MOSAPI void * memmove(void *dest, const void *src, size_t n)
Definition mos_string.c:111
MOSAPI s32 strncmp(const char *str1, const char *str2, size_t n)
Definition mos_string.c:32
MOSAPI char * strtok_r(char *str, const char *delim, char **saveptr)
Definition mos_string.c:303
MOSAPI s32 strcmp(const char *str1, const char *str2)
Definition mos_string.c:24
MOSAPI size_t strnlen(const char *, size_t)
Definition mos_string.c:16
MOSAPI char * strpbrk(const char *s, const char *accept)
Definition mos_string.c:270
MOSAPI char * strndup(const char *src, size_t n)
#define MOSAPI
Definition mos_global.h:102
#define __pure
Definition mos_global.h:31
#define memzero(ptr, size)
Definition rpc_client.c:40
signed int s32
Definition types.h:15