Libft
Custom implementation of core libc functions with additional utility helpers.
Loading...
Searching...
No Matches
string_life_cycle.c File Reference
#include "libft.h"
#include <stdlib.h>
Include dependency graph for string_life_cycle.c:

Functions

bool string_init (t_string *s, size_t initial_cap, const char *str, long n)
 Initializes a string with the specified initial capacity.
 
void string_take (t_string *dst, char *src, size_t cap, ssize_t len)
 Installs an existing buffer in a string without copying it.
 
void string_take_string (t_string *dst, t_string *src)
 Move the internal storage of one string into another string.
 
void string_free (t_string *string)
 Frees the string's internal data.
 
void string_free_void (void *string)
 Frees a t_string item through a generic void* callback signature.