]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/inspstring.h
Windows support. Tested and working to compile on freebsd and linux. Next step is...
[user/henk/code/inspircd.git] / include / inspstring.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __IN_INSPSTRING_H
15 #define __IN_INSPSTRING_H
16
17 #include "inspircd_config.h"
18 #include <string.h>
19 #include <cstddef>
20
21 #ifndef HAS_STRLCPY
22 CoreExport size_t strlcpy(char *dst, const char *src, size_t siz);
23 CoreExport size_t strlcat(char *dst, const char *src, size_t siz);
24 #endif
25
26 CoreExport int charlcat(char* x,char y,int z);
27 CoreExport bool charremove(char* mp, char remove);
28 inline char * strnewdup(const char * s1)
29 {
30         size_t len = strlen(s1) + 1;
31         char * p = new char[len];
32         memcpy(p, s1, len);
33         return p;
34 }
35
36 #endif