/* ** (c) COPYRIGHT MIT 1995. ** 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 */
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));
extern int strcasecomp PARAMS((CONST char *a, CONST char *b)); extern int strncasecomp PARAMS((CONST char *a, CONST char *b, int n));
strstr()
but is not case-sensitive.
extern char * strcasestr PARAMS((char * s1, char * s2));
extern char * HTNextField PARAMS ((char** pstr));
extern CONST char *HTDateTimeStr PARAMS((time_t *calendar, BOOL local));
extern long HTGetTimeZoneOffset NOPARAMS;
time_t
.
extern time_t HTParseTime PARAMS((CONST char * str));
extern CONST char *HTMessageIdStr NOPARAMS; #endifEnd of declaration module