SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
string.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef __STRING_H__
4#define __STRING_H__
5
6#include <stdarg.h>
7#include <types.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif// __cplusplus
12
21void *memcpy(void *dst, const void *src, int cnt) __attribute__((optimize("O0")));
22
31void *memset(void *dst, int val, int cnt) __attribute__((optimize("O0")));
32
41int memcmp(const void *dst, const void *src, unsigned int cnt) __attribute__((optimize("O0")));
42
49unsigned int strlen(const char *str) __attribute__((optimize("O0")));
50
58unsigned int strnlen(const char *s, unsigned int n) __attribute__((optimize("O0")));
59
67char *strcpy(char *dst, const char *src) __attribute__((optimize("O0")));
68
77char *strncpy(char *dest, const char *src, unsigned int n) __attribute__((optimize("O0")));
78
86char *strcat(char *dst, const char *src) __attribute__((optimize("O0")));
87
95int strcmp(const char *p1, const char *p2) __attribute__((optimize("O0")));
96
105int strncmp(const char *p1, const char *p2, unsigned int cnt) __attribute__((optimize("O0")));
106
114char *strchr(const char *s, int c) __attribute__((optimize("O0")));
115
123char *strrchr(const char *s, int c) __attribute__((optimize("O0")));
124
132char *strstr(const char *s, const char *what) __attribute__((optimize("O0")));
133
142void *memchr(void *ptr, int value, unsigned int num) __attribute__((optimize("O0")));
143
152void *memmove(void *dest, const void *src, unsigned int count) __attribute__((optimize("O0")));
153
154#ifdef CONFIG_SPRINTF
162int sprintf(char *buf, const char *fmt, ...);
163
174int snprintf(char *buf, size_t n, const char *fmt, ...);
175
185int vsnprintf(char *buf, size_t n, const char *fmt, va_list ap);
186
187#endif// CONFIG_SPRINTF
188
189#ifdef __cplusplus
190}
191#endif// __cplusplus
192
193#endif /* #ifndef __STRING_H__ */
const __attribute__((section(".boot0_head")))
Definition head.c:58
ul val
Definition memtester.c:33
__builtin_va_list va_list
Definition stdarg.h:4
void * memset(void *s, int c, size_t n)
Definition string.c:15
void * memcpy(void *dest, const void *src, size_t len)
Definition string.c:25
static uint8_t value
Definition io.h:144
char * strrchr(const char *s, int c) __attribute__((optimize("O0")))
Finds the last occurrence of the character 'c' (converted to a char) in the string pointed to by 's',...
Definition string.c:86
char * strstr(const char *s, const char *what) __attribute__((optimize("O0")))
Finds the first occurrence of the substring 'what' in the string 's'.
Definition string.c:97
char * strchr(const char *s, int c) __attribute__((optimize("O0")))
Finds the first occurrence of the character 'c' (converted to a char) in the string pointed to by 's'...
Definition string.c:78
unsigned int strlen(const char *str) __attribute__((optimize("O0")))
Calculates the length of the string 'str', excluding the terminating null byte.
Definition string.c:9
void * memchr(void *ptr, int value, unsigned int num) __attribute__((optimize("O0")))
Locates the first occurrence of the character 'value' (converted to an unsigned char) in the first 'n...
Definition string.c:119
int strcmp(const char *p1, const char *p2) __attribute__((optimize("O0")))
Compares the string pointed to by 'p1' to the string pointed to by 'p2'.
Definition string.c:46
char * strcpy(char *dst, const char *src) __attribute__((optimize("O0")))
Copies the string pointed to by 'src', including the terminating null byte, to the buffer pointed to ...
Definition string.c:26
int memcmp(const void *dst, const void *src, unsigned int cnt) __attribute__((optimize("O0")))
Compares the first 'cnt' bytes of the memory areas 'dst' and 'src'.
Definition memcmp.c:10
void * memmove(void *dest, const void *src, unsigned int count) __attribute__((optimize("O0")))
Copies 'count' bytes from the memory area 'src' to the memory area 'dest'.
Definition string.c:147
unsigned int strnlen(const char *s, unsigned int n) __attribute__((optimize("O0")))
Calculates the length of the string 's', but not more than 'n' characters.
Definition string.c:18
char * strcat(char *dst, const char *src) __attribute__((optimize("O0")))
Appends the string pointed to by 'src', including the terminating null byte, to the end of the string...
Definition string.c:35
int strncmp(const char *p1, const char *p2, unsigned int cnt) __attribute__((optimize("O0")))
Compares at most the first 'cnt' characters of the string pointed to by 'p1' to the string pointed to...
Definition string.c:61
char * strncpy(char *dest, const char *src, unsigned int n) __attribute__((optimize("O0")))
Copies up to 'n' characters from the string pointed to by 'src', including the terminating null byte,...
Definition string.c:135