Luna/libluna/include/luna/CString.h
apio 77887eed80
All checks were successful
continuous-integration/drone/push Build is passing
luna -> libluna
2023-02-27 15:22:39 +01:00

32 lines
935 B
C

#pragma once
#include <luna/Types.h>
extern "C"
{
void* memcpy(void* dest, const void* src, usize n);
void* memset(void* buf, int c, usize n);
int memcmp(const void* a, const void* b, usize n);
void* memmove(void* dest, const void* src, usize n);
usize strlen(const char* str);
usize strnlen(const char* str, usize max);
int strcmp(const char* a, const char* b);
usize wcslen(const wchar_t* str);
char* strdup(const char* str);
char* strndup(const char* str, usize max);
// Copies len bytes from src into dest and adds a null terminator.
// FIXME: Replace this invented function with strlcpy().
void nullcpy(char* dest, const char* src, usize len);
usize strlcpy(char* dest, const char* src, usize len);
[[deprecated]] char* strcpy(char* dst, const char* src);
[[deprecated]] char* strcat(char* dst, const char* src);
char* strchr(const char* str, int c);
}