librfn
An ad-hoc utility library
string.h
Go to the documentation of this file.
1 /*
2  * string.h
3  *
4  * Part of librfn (a general utility library from redfelineninja.org.uk)
5  *
6  * Copyright (C) 2012-2014 Daniel Thompson <daniel@redfelineninja.org.uk>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published
10  * by the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  */
13 
14 #ifndef RF_STRING_H_
15 #define RF_STRING_H_
16 
17 #include <stdarg.h>
18 #include <stdlib.h>
19 
31 char *xstrdup(const char *s);
32 
33 char *strdup_join(const char *head, const char *tail);
34 char *xstrdup_join(const char *head, const char *tail);
35 
36 char *strtolower(char *s);
37 char *strdup_tolower(const char *s);
38 char *xstrdup_tolower(const char *s);
39 
40 char *strtoupper(char *s);
41 char *strdup_toupper(const char *s);
42 char *xstrdup_toupper(const char *s);
43 
44 char *strdup_printf(const char *format, ...);
45 char *strdup_vprintf(const char *format, va_list ap);
46 char *xstrdup_printf(const char *format, ...);
47 char *xstrdup_vprintf(const char *format, va_list ap);
48 
50 #endif // RF_STRING_H_
char * xstrdup(const char *s)
Definition: string.c:29
char * strdup_toupper(const char *s)
Definition: string.c:77
char * xstrdup_tolower(const char *s)
Definition: string.c:63
char * xstrdup_join(const char *head, const char *tail)
Definition: string.c:39
char * strdup_join(const char *head, const char *tail)
Definition: string.c:34
char * xstrdup_vprintf(const char *format, va_list ap)
Definition: string.c:129
char * xstrdup_toupper(const char *s)
Definition: string.c:83
char * strdup_vprintf(const char *format, va_list ap)
Definition: string.c:100
char * strtolower(char *s)
Definition: string.c:44
char * strtoupper(char *s)
Definition: string.c:68
char * strdup_printf(const char *format,...)
Definition: string.c:88
char * strdup_tolower(const char *s)
Definition: string.c:57
char * xstrdup_printf(const char *format,...)
Definition: string.c:117