|
libft
|
Implementation of pointer and integer array utilities. More...
#include "libft.h"
Include dependency graph for ft_array.c:Functions | |
| size_t | ft_arraysize (void **array) |
| Returns the number of elements in a NULL-terminated array. | |
| char ** | ft_copy_strarray (char **array) |
| Creates a deep copy of a NULL-terminated string array. | |
| void | ft_free_array (void **array) |
| Frees a NULL-terminated array. | |
| void | ft_free_array_size (void **array, size_t size) |
| Frees an array of pointers with a known size. | |
| bool | ft_is_array_sorted (const int *array, size_t size) |
| Checks if an array of integers is sorted in ascending order. | |
| int | ft_putintarray (int *array, int size) |
| Prints an array of integers to standard output. | |
Implementation of pointer and integer array utilities.
This file is part of the libft project and implements helper functions for working with dynamically allocated arrays:
ft_arraysize: counts elements in a NULL-terminated pointer arrayft_copy_strarray: deep-copies a NULL-terminated string arrayft_free_array: frees a NULL-terminated arrayft_free_array_size: frees a pointer array of known sizeft_is_array_sorted: checks if an integer array is sortedft_putintarray: prints an integer array to standard outputAll functions are designed to be memory-safe and easy to use in generic contexts such as CLI tools, parsers, or game engines.