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

Functions

bool buff_adjust (t_buff *buff)
 Shrinks buffer capacity to match its current length.
 
ssize_t buff_get_index_c (const t_buff *buff, char c)
 Finds the index of the first occurrence of a character in the buffer.
 
ssize_t buff_get_index_s (const t_buff *buff, const char *s, ssize_t slen)
 Finds the first occurrence of a substring in the buffer.
 
char * buff_get_string (const t_buff *buff)
 Returns a newly allocated copy of the buffer content.