35 char *ptr, *ptr_to, *ptr_from;
37 if ((lt = strlen(to)) < (lf = strlen(from))) {
39 to_temp =
tmalloc(
sizeof(*to_temp) * (lf + 1));
46 from_temp =
tmalloc(
sizeof(*from_temp) * (lt + 1));
58 if (*ptr_from != *ptr) {
void * tmalloc(uint64_t size_of_block)
Allocates a memory block of the specified size with zero initialization.
char * replace_chars(char *s, char *from, char *to)
Maps one set of characters to another in a given string.
char * strcpy_ss(char *dest, const char *src)
Safely copies a string, handling memory overlap.