Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
Loading...
Searching...
No Matches
string.h
Go to the documentation of this file.
1
13#ifndef UTILS_STRING_H
14#define UTILS_STRING_H
15
16#include <stddef.h>
17
18// NOLINTBEGIN(*-redundant-declaration, *-parameter-name)
19
29void *memcpy(void *dest, const void *src, size_t size);
30
40int memcmp(const void *str1, const void *str2, size_t size);
41
54void *memchr(const void *str, int chr, size_t size);
55
67void *memmove(void *dest, const void *src, size_t size);
68
78void *memset(void *s_ptr, int val, size_t size);
79
93int memset_s(void *dest, size_t destsz, int byte, size_t count);
94
101char *strchr(const char *str, int chr);
102
113char *strrchr(const char *str, int chr);
114
123size_t strlen(const char *str);
124
135size_t strnlen(const char *str, size_t maxlen);
136
144// NOLINTNEXTLINE(readability-redundant-declaration)
145unsigned long strtoul(const char *nptr, char **endptr, int base);
146
156int strcmp(const char *lhs, const char *rhs);
157
158// NOLINTEND(*-redundant-declaration, *-parameter-name)
159
160#endif // UTILS_STRING_H
size_t strlen(const char *str)
Calculates the length of a string.
Definition string.c:117
void * memcpy(void *dest, const void *src, size_t size)
Copies size bytes from memory area src to memory area dest.
Definition string.c:15
void * memset(void *s_ptr, int val, size_t size)
Fills the first size bytes of the memory area pointed to by s_ptr with the constant byte val.
Definition string.c:71
char * strchr(const char *str, int chr)
Locate the first occurrence of a character in a string.
Definition string.c:93
int strcmp(const char *lhs, const char *rhs)
Compare two null-terminated strings.
Definition string.c:171
int memcmp(const void *str1, const void *str2, size_t size)
Compares the first size bytes of memory areas str1 and str2.
Definition string.c:25
char * strrchr(const char *str, int chr)
Locates the last occurrence of a character in a string.
Definition string.c:104
int memset_s(void *dest, size_t destsz, int byte, size_t count)
Bounds-checked fill of dest with a constant byte.
Definition string.c:80
unsigned long strtoul(const char *nptr, char **endptr, int base)
Convert a string to an unsigned long integer.
Definition string.c:133
void * memchr(const void *str, int chr, size_t size)
Scans memory for a specific character.
Definition string.c:39
size_t strnlen(const char *str, size_t maxlen)
Calculates the length of a string up to a specified maximum.
Definition string.c:125
void * memmove(void *dest, const void *src, size_t size)
Copies size bytes from memory area src to memory area dest.
Definition string.c:50