Design Pattern Examples
Overview of object-oriented design patterns
helpers/titlecase.h File Reference

Declaration of the titlecase() function, for making a word lowercase with the first letter uppercase. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __TITLECASE_H__
 

Functions

char * titlecase (const char *s)
 Convert the first word (or only word) in the given string to lowercase then make the first letter uppercase. It does not touch any of the other words after the first.
 

Detailed Description

Declaration of the titlecase() function, for making a word lowercase with the first letter uppercase.

Definition in file helpers/titlecase.h.

Macro Definition Documentation

◆ __TITLECASE_H__

#define __TITLECASE_H__

Definition at line 8 of file helpers/titlecase.h.

Function Documentation

◆ titlecase()

char * titlecase ( const char *  s)

Convert the first word (or only word) in the given string to lowercase then make the first letter uppercase. It does not touch any of the other words after the first.

Note that this is not locale-sensitive.

Parameters
sA string to work on.
Returns
Returns a pointer to newly allocated buffer containing the modified string. Call free() on the pointer when done with it. Returns NULL if an out of memory condition occurs.

Definition at line 15 of file titlecase.c.

Referenced by Interpreter_Interpret().