libft
Functions
ft_striteri.c File Reference
#include "libft.h"
+ Include dependency graph for ft_striteri.c:

Go to the source code of this file.

Functions

void ft_striteri (char *s, void(*f)(unsigned int, char *))
 Applies a function to characters of a string and their indices. More...
 

Function Documentation

◆ ft_striteri()

void ft_striteri ( char *  s,
void(*)(unsigned int, char *)  f 
)

Applies a function to characters of a string and their indices.

Applies the function f to each character of the string passed as argument, and passing its index as first argument. Each character is passed by address to f to be modified if necessary.

Parameters
sThe string to iterate.
fThe function to apply to each character of s and its index.

Definition at line 25 of file ft_striteri.c.