The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

inspstring.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
00006  * See: http://www.inspircd.org/wiki/index.php/Credits
00007  *
00008  * This program is free but copyrighted software; see
00009  *            the file COPYING for details.
00010  *
00011  * ---------------------------------------------------
00012  */
00013 
00014 #ifndef __IN_INSPSTRING_H
00015 #define __IN_INSPSTRING_H
00016 
00017 // This (inspircd_config) is needed as inspstring doesn't pull in the central header
00018 #include "inspircd_config.h"
00019 #include <cstring>
00020 //#include <cstddef>
00021 
00022 #ifndef HAS_STRLCPY
00023 
00024 CoreExport size_t strlcpy(char *dst, const char *src, size_t siz);
00026 CoreExport size_t strlcat(char *dst, const char *src, size_t siz);
00027 #endif
00028 
00035 CoreExport int charlcat(char* x,char y,int z);
00040 CoreExport bool charremove(char* mp, char remove);
00041 
00048 inline char * strnewdup(const char * s1)
00049 {
00050         size_t len = strlen(s1) + 1;
00051         char * p = new char[len];
00052         memcpy(p, s1, len);
00053         return p;
00054 }
00055 
00056 #endif
00057