Libft
Custom implementation of core libc functions with additional utility helpers.
Loading...
Searching...
No Matches
string_internal.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* string_internal.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: gastesan <gastesan@student.42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2026/01/11 02:13:40 by gastesan #+# #+# */
9/* Updated: 2026/07/17 15:36:57 by gastesan ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef STRING_INTERNAL_H
14# define STRING_INTERNAL_H
15
16# include "libft.h"
17# include <stddef.h>
18
29size_t string_get_required_cap(size_t current_cap, size_t target_cap);
30
47ssize_t string_read_n_bytes(t_string *string, int fd, size_t n);
48
49#endif
ssize_t string_read_n_bytes(t_string *string, int fd, size_t n)
Reads up to n bytes from a file descriptor into a string.
Definition string_internal.c:59
size_t string_get_required_cap(size_t current_cap, size_t target_cap)
Calculates the required capacity to accommodate a target cap.
Definition string_internal.c:22
Dynamic string structure with NUL-terminated storage.
Definition libft.h:81