libtcod
Loading...
Searching...
No Matches
portability.h File Reference

Miscellaneous tools needed across platforms. More...

#include "config.h"
#include <wchar.h>
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Functions

char * TCOD_strdup (const char *s)
 Allocate and return a duplicate of string s.
int TCOD_strcasecmp (const char *s1, const char *s2)
 Compare two ASCII strings ignoring case.
int TCOD_strncasecmp (const char *s1, const char *s2, size_t n)
 Compare two ASCII strings ignoring case.

Detailed Description

Miscellaneous tools needed across platforms.

Function Documentation

◆ TCOD_strcasecmp()

int TCOD_strcasecmp ( const char * s1,
const char * s2 )

Compare two ASCII strings ignoring case.

Returns 0 if the strings are equal.

◆ TCOD_strdup()

char * TCOD_strdup ( const char * s)

Allocate and return a duplicate of string s.

The returned memory must be freed manually.

◆ TCOD_strncasecmp()

int TCOD_strncasecmp ( const char * s1,
const char * s2,
size_t n )

Compare two ASCII strings ignoring case.

Returns 0 if the strings are equal.