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 File Reference

#include "inspircd_config.h"
#include <cstring>

Include dependency graph for inspstring.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

CoreExport int charlcat (char *x, char y, int z)
 charlcat() will append one character to a string using the same safety scemantics as strlcat().
CoreExport bool charremove (char *mp, char remove)
 charremove() will remove all instances of a character from a string
char * strnewdup (const char *s1)
 strnewdup() is an implemenetation of strdup() which calls operator new rather than malloc to allocate the new string, therefore allowing it to be hooked into the C++ memory manager, and freed with operator delete.


Function Documentation

CoreExport int charlcat char *  x,
char  y,
int  z
 

charlcat() will append one character to a string using the same safety scemantics as strlcat().

Parameters:
x The string to operate on
y the character to append to the end of x
z The maximum allowed length for z including null terminator

Definition at line 104 of file inspstring.cpp.

Referenced by Channel::ChanModes().

CoreExport bool charremove char *  mp,
char  remove
 

charremove() will remove all instances of a character from a string

Parameters:
mp The string to operate on
remove The character to remove

Definition at line 121 of file inspstring.cpp.

char* strnewdup const char *  s1  )  [inline]
 

strnewdup() is an implemenetation of strdup() which calls operator new rather than malloc to allocate the new string, therefore allowing it to be hooked into the C++ memory manager, and freed with operator delete.

This is required for windows, where we override operators new and delete to allow for global allocation between modules and the core.

Definition at line 48 of file inspstring.h.

Referenced by DoClass(), and DoType().