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

Go to the source code of this file.

Functions

char * ft_strcapitalize (const char *s1)
 Capitalizes all words in a string. More...
 

Function Documentation

◆ ft_strcapitalize()

char* ft_strcapitalize ( const char *  s1)

Capitalizes all words in a string.

Capitalizes all words (defined as stretches of alpha-numeric characters) in a NULL-terminated string and writes them to a newly allocated string.

Example
ft_strcapitalize("My word IS 42about%8THEM") returns "My Word Is 42about%8them")
Parameters
s1The string to capitalize.
Returns
A duplicate of str in which all words have been capitalized, or NULL if allocation fails.

Definition at line 51 of file ft_strcapitalize.c.