String Management

/*
**	(c) COPYRIGHT CERN 1994.
**	Please first read the full copyright statement in the file COPYRIGH.
*/
These functions provide functionality for case-independent string comparison and allocations with copies etc.

This module is implemented by HTString.c, and it is a part of the Library of Common Code.

#ifndef HTSTRING_H
#define HTSTRING_H


extern CONST char * HTLibraryVersion;	/* String for help screen etc */

Dynamic String Manipulation

These two functions are dynamic versions of strcpy and strcat. They use malloc for allocating space for the string. If StrAllocCopy is called with a non-NULL dest, then this is freed before the new value is assigned so that only the last string created has to be freed by the user. If StrAllocCat is called with a NULL pointer as destination then it is equivalent to StrAllocCopy.
#define StrAllocCopy(dest, src) HTSACopy (&(dest), src)
#define StrAllocCat(dest, src)  HTSACat  (&(dest), src)
extern char * HTSACopy PARAMS ((char **dest, CONST char *src));
extern char * HTSACat  PARAMS ((char **dest, CONST char *src));

Case-insensitive strstr

This works like strstr() but is not case-sensitive.
extern char * strcasestr PARAMS((char *	s1, char * s2));

Next word or quoted string

extern char * HTNextField PARAMS ((char** pstr));
#endif