string.h
author darkvater
Thu, 24 Mar 2005 19:40:48 +0000
changeset 1547 b6c044db8bb1
parent 1317 f382f1b439c7
child 2186 461a2aff3486
permissions -rw-r--r--
(svn r2051) - Remove trailing tabs from vs.net project file
- Set proper line-ending for newly added files waypoint.[ch]. PLEASE don't forget this!
#ifndef STRING_H
#define STRING_H

/*
 * dst: destination buffer
 * src: string to copy/concatenate
 * size: size of the destination buffer
 * usage: ttd_strlcpy(dst, src, lengthof(dst));
 */
void ttd_strlcat(char *dst, const char *src, size_t size);
void ttd_strlcpy(char *dst, const char *src, size_t size);

/*
 * dst: destination buffer
 * src: string to copy
 * last: pointer to the last element in the dst array
 *       if NULL no boundary check is performed
 * returns a pointer to the terminating \0 in the destination buffer
 * usage: strecpy(dst, src, lastof(dst));
 */
char* strecat(char* dst, const char* src, const char* last);
char* strecpy(char* dst, const char* src, const char* last);

#endif