summaryrefslogtreecommitdiff
path: root/src/z-util.h
blob: d2fa79dcf8c99704c9202f02f884f0278fbdacae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once

#ifdef __cplusplus
extern "C" {
#endif

#include "h-basic.h"


/*
 * Extremely basic stuff, like "streq()".
 */


/* Aux functions */
extern void (*plog_aux)(cptr);
extern void (*quit_aux)(cptr);


/**** Available Functions ****/


/* Test equality, prefix, suffix */
bool_ streq(cptr s, cptr t);
bool_ prefix(cptr s, cptr t);
bool_ suffix(cptr s, cptr t);


/* Capitalize the first letter of string. Ignores whitespace at the start of string. */
void capitalize(char *s);

/* Print an error message */
void plog(cptr str);

/* Exit, with optional message */
void quit(cptr str);


#ifdef __cplusplus
} /* extern "C" */
#endif