feat(memory, string): add memory and string utilities
This commit is contained in:
10
include/memory.h
Normal file
10
include/memory.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef RIVOS_MEMORY_H
|
||||
#define RIVOS_MEMORY_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
void *kmemset(void *buf, char c, size_t n);
|
||||
|
||||
void *kmemcpy(void *dst, const void *src, size_t n);
|
||||
|
||||
#endif
|
||||
15
include/string.h
Normal file
15
include/string.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef RIVOS_STRING_H
|
||||
#define RIVOS_STRING_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* This is not a safe function, check dst size
|
||||
*/
|
||||
char *kstrcpy(char *dst, const char *src);
|
||||
|
||||
size_t kstrlen(const char *str);
|
||||
|
||||
int kstrcmp(const char *s1, const char *s2);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user