#ifndef MDC_C_STRING_H
#define MDC_C_STRING_H
// Copyright 2005 GoingWare Inc.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// libmdc - http://www.goingware.com/libmdc/
/* Like strcpy and friends, only not quite so brain-dead.
* Also with C++ signatures: the ones with throw() in their
* prototype are safe for use by exception classes.
*/
namespace mdc{
namespace c_string{
/* append appends string str to buffer buf, but
* that already has prevLen characters in it. It will not exceed
* bufSize in length, *INCLUDING* the terminating zero. strncat
* and strncpy on the other hand won't add a '\0' if the string is
* too long, making them basically useless.
*
* That means that it will ensure a buffer of 256 bytes gets
* at most 255 characters.
*
* It returns the length of the text after appending str, so you
* can pass it in again to append another string.
*/
int append( char *buf,
char const *str,
unsigned long prevLen,
unsigned long bufSize ) throw();
}// namespace c_string
}// namespace mdc
#endif