17#define MAX_WORD_LEN 40
20 str_concat_impl(sizeof((const char*[]){__VA_ARGS__}) / sizeof(const char*), __VA_ARGS__)
42string strcpy(
string dest, cstring src);
52string strncpy(
string dest, cstring src,
size_t n);
81int strncmp(cstring s1, cstring s2,
size_t n);
149long strtol(
const char *str,
char **endptr,
int base);
182char**
splitf(
const char* str,
char delim,
int* num_tokens);
192char* trim_inplace(
char* s);
194char* strrchr(
const char* s,
int c);
This is a basic header files with FrostWing specific short forms and basically a good for life header...
char * leading_trailing_trim(const char *str)
Removes the leading and trailing spaces.
string strcpy(string dest, cstring src)
Copies a string from src to dest.
char ** splitf(const char *str, char delim, int *num_tokens)
Splits a string into tokens based on a delimiter.
int strcmp(cstring s1, cstring s2)
Compares two strings lexicographically.
int strncmp(cstring s1, cstring s2, size_t n)
Compares two strings, up to a specified number of characters.
string trim(cstring str)
Creates a new string without spaces from a C-style string.
string strncpy(string dest, cstring src, size_t n)
Copies n characters from src to dest.
char * uint_to_string(unsigned int num)
Converts an uint to string.
int isspace(char c)
Implemented for sh.c.
char * hex_to_string(signed int num, bool caps)
Prints Hexadecimal number.
void remove_last_char(string str)
Removes the last char.
int strlen(char s[])
Calculate the length of a null-terminated string.
bool contains(cstring str, cstring substr)
Check if a substring is found within a string.
string strcat(string dest, cstring src)
Concatenate two strings.
long strtol(const char *str, char **endptr, int base)
Converts a string to a long integer.
void string_transport_front(char *str, int x)
Move the last x characters of a string to the front and delete the rest.