Luna/libc/include/string.h
apio 471103e4f3
All checks were successful
continuous-integration/drone/push Build is passing
Remove the word 'header' from libc header descriptions
2023-01-07 11:39:15 +01:00

52 lines
1.5 KiB
C

/* string.h: String manipulation. */
#ifndef _STRING_H
#define _STRING_H
#include <bits/attrs.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
/* Copy n bytes of memory from src to dest. */
void* memcpy(void* dest, const void* src, size_t n);
/* Set n bytes of memory to the character c. */
void* memset(void* buf, int c, size_t n);
/* Compare n bytes of two memory locations. */
int memcmp(const void* a, const void* b, size_t n);
/* Copy n bytes of memory from src to dest, where src and dest may overlap. */
void* memmove(void* dest, const void* src, size_t n);
/* Return the length of a null-terminated string. */
size_t strlen(const char* str);
/* Compare two null-terminated strings. */
int strcmp(const char* a, const char* b);
/* Copy the null-terminated string src into dest. Should be avoided to prevent buffer overflow attacks. */
__deprecated char* strcpy(char* dest, const char* src);
/* Concatenate the null-terminated string src onto dest. Should be avoided to prevent buffer overflow attacks. */
__deprecated char* strcat(char* dest, const char* src);
/* Return a pointer to the first occurrence of the character c in str, or NULL if it could not be found. */
char* strchr(const char* str, int c);
/* Return a heap-allocated copy of a string. */
char* strdup(const char* str);
/* Return the human-readable description of an error number. */
char* strerror(int errnum);
#ifdef __cplusplus
}
#endif
#endif