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

Go to the source code of this file.

Functions

char * ft_strrev (const char *s)
 Reverses a string. More...
 

Function Documentation

◆ ft_strrev()

char* ft_strrev ( const char *  s)

Reverses a string.

Allocates (with malloc) and returns a “reversed” NULL-terminated string.

Example
ft_strrev("0123456789") returns "9876543210"
Parameters
sString to be reversed.
Returns
Reversed string or NULL if allocation failed.

Definition at line 26 of file ft_strrev.c.