|
libft
|
#include "libft.h"
Include dependency graph for ft_strmapi.c:Go to the source code of this file.
Functions | |
| char * | ft_strmapi (char const *s, char(*f)(unsigned int, char)) |
Maps a function to characters of a string and their indices Applies the function f to each character of the string passed as argument by giving its index as first argument to create a “fresh” new string (with malloc) resulting from the successive applications of f. More... | |
| char* ft_strmapi | ( | char const * | s, |
| char(*)(unsigned int, char) | f | ||
| ) |
Maps a function to characters of a string and their indices Applies the function f to each character of the string passed as argument by giving its index as first argument to create a “fresh” new string (with malloc) resulting from the successive applications of f.
| s | The string to map. |
| f | The function to apply to each character and its index of s. |
NULL if allocation fails. Definition at line 28 of file ft_strmapi.c.
1.8.16