#ifndef _LIBSTRING_STRING_H
#define _LIBSTRING_STRING_H

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

typedef bool (*strtokenize_cb_func_t) (void* ctx, const char* start, size_t len);

/* Set block of memory */
size_t memset (void* dst, uint8_t b, size_t n);

/* Copy memory from src to dst */
size_t memcpy (void* dst, const void* src, size_t n);

/* Copy n chars from string */
void strncpy (char* dst, const char* src, size_t n);

/* Count chars in a string */
size_t strlen (const char* str);

/* Compare blocks of memory */
int memcmp (const void* s1, const void* s2, size_t n);

/* tokenize a string */
void strtokenize (const char* str, char delim, void* ctx, strtokenize_cb_func_t cb);

/* compare strings */
int strcmp (const char* s1, const char* s2);

/* concatinate strings */
char* strcat (char* dest, const char* src);

char* strncat (char* dest, const char* src, size_t n);

void* memmove (void* dest, const void* src, unsigned int n);

void* memchr (const void* s, unsigned char c, size_t n);

void str_split_lines (const char* str, size_t total_len, void* ctx, strtokenize_cb_func_t cb);

char* strcpy (char* strDest, const char* strSrc);

int strncmp (const char* s1, const char* s2, size_t n);

char* strstr (const char* str, const char* substring);

char* strchr (register const char* s, int c);

int isalnum (int c);

int isalpha (int c);

int iscntrl (int c);

int isdigit (int c);

int isgraph (int c);

int islower (int c);

int isprint (int c);

int ispunct (int c);

int isspace (int c);

int isupper (int c);

int isxdigit (int c);

int isascii (int c);

int isblank (int c);

int tolower (int chr);

int toupper (int chr);

#endif // _LIBSTRING_STRING_H
