summaryrefslogtreecommitdiff
path: root/include/inspstring.h
blob: 1e6ba68e666063f0b6be56211170909f155f10a9 (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
/*       +------------------------------------+
 *       | Inspire Internet Relay Chat Daemon |
 *       +------------------------------------+
 *
 *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
 * See: http://www.inspircd.org/wiki/index.php/Credits
 *
 * This program is free but copyrighted software; see
 *            the file COPYING for details.
 *
 * ---------------------------------------------------
 */

#ifndef __IN_INSPSTRING_H
#define __IN_INSPSTRING_H

#include "inspircd_config.h"
#include <string.h>
#include <cstddef>

#ifndef HAS_STRLCPY
CoreExport size_t strlcpy(char *dst, const char *src, size_t siz);
CoreExport size_t strlcat(char *dst, const char *src, size_t siz);
#endif

CoreExport int charlcat(char* x,char y,int z);
CoreExport bool charremove(char* mp, char remove);
inline char * strnewdup(const char * s1)
{
	size_t len = strlen(s1) + 1;
	char * p = new char[len];
	memcpy(p, s1, len);
	return p;
}

#endif