|
Libft
42 Libft library documentation
|
#include "../includes/libft.h"
Include dependency graph for ft_split.c:Go to the source code of this file.
Functions | |
| static size_t | ft_count_words (char const *s, char c) |
| Counts words separated by a delimiter in a string. | |
| static char ** | ft_fill_split (char **split, char const *s, char c) |
| Fills the split array with allocated word substrings. | |
| static void | ft_free_split (char **split, size_t i) |
| Frees partially allocated split entries. | |
| char ** | ft_split (char const *s, char c) |
| Splits a string into an array of substrings. | |
|
static |
Counts words separated by a delimiter in a string.
| s | Input string. |
| c | Delimiter character. |
Definition at line 83 of file ft_split.c.
Referenced by ft_split().
Here is the caller graph for this function:
|
static |
Fills the split array with allocated word substrings.
| split | Destination array. |
| s | Input string. |
| c | Delimiter character. |
split on success, NULL on allocation failure. Definition at line 50 of file ft_split.c.
References ft_free_split(), and ft_substr().
Referenced by ft_split().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Frees partially allocated split entries.
| split | Array of strings. |
| i | Number of initialized entries. |
Definition at line 110 of file ft_split.c.
Referenced by ft_fill_split().
Here is the caller graph for this function:| char ** ft_split | ( | char const * | s, |
| char | c | ||
| ) |
Splits a string into an array of substrings.
Uses the delimiter c to separate words. The returned array is NULL-terminated.
| s | Input string. |
| c | Delimiter character. |
Definition at line 30 of file ft_split.c.
References ft_count_words(), and ft_fill_split().
Here is the call graph for this function: