LumaOS  v0.1.116
An experimental x86-64 OS
Loading...
Searching...
No Matches
kstring.h
Go to the documentation of this file.
1
9
10#ifndef KERNEL_LIB_STRING_H
11#define KERNEL_LIB_STRING_H
12
13#include <stddef.h>
14#include <stdbool.h>
15#include <stdint.h>
16
24void* memcpy(void* dest, const void* src, size_t n);
25
33void* memmove(void* dest, const void* src, size_t n);
34
42void* memset(void* dest, int c, size_t n);
43
53int memcmp(const void* a, const void* b, size_t n);
54
63int strcmp(const char *s1, const char *s2);
64
74int strncmp(const char *s1, const char *s2, size_t n);
75
81size_t strlen(const char *str);
82
89char* strcat(char *str1, const char *str2);
90
97char* int_to_str(uint64_t value, char *buff);
98
106void int_to_hex_str(unsigned long long value, char *buff, uint8_t char_limit);
107
108#endif
size_t strlen(const char *str)
Calculates the length of a string.
Definition kstring.c:92
int strncmp(const char *s1, const char *s2, size_t n)
Compares 2 strings up to n characters.
Definition kstring.c:77
char * strcat(char *str1, const char *str2)
Concatenates (joins) 2 strings.
Definition kstring.c:107
int strcmp(const char *s1, const char *s2)
Compares 2 strings.
Definition kstring.c:66
void * memset(void *dest, int c, size_t n)
Fills n bytes of the destination with c.
Definition kstring.c:44
void * memmove(void *dest, const void *src, size_t n)
Copies memory from one address to the other with possible overlap.
Definition kstring.c:26
void int_to_hex_str(unsigned long long value, char *buff, uint8_t char_limit)
Converts an integer value into a hex string.
Definition kstring.c:165
int memcmp(const void *a, const void *b, size_t n)
Compares 2 the value of 2 memory addresses.
Definition kstring.c:52
char * int_to_str(uint64_t value, char *buff)
Converts an integer to a string.
Definition kstring.c:120
void * memcpy(void *dest, const void *src, size_t n)
Copies memory from one address to the other without overlapping.
Definition kstring.c:14