--- libwww/Library/src/HTString.html 1996/04/12 17:48:53 2.31 +++ libwww/Library/src/HTString.html 1996/05/20 15:07:15 2.32 @@ -1,43 +1,40 @@ -W3C Reference Library libwww DYNAMIC STRINGS - + + W3C Reference Library libwww Generic String Management - -

Generic String Management

- +

+ Generic String Management +

 /*
 **	(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 -W3C Reference Library.

- +

+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 W3C +Reference Library.

 #ifndef HTSTRING_H
 #define HTSTRING_H
 
- -

Dynamic String Manipulation

- +

+ 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. - - +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)
@@ -45,65 +42,65 @@ then it is equivalent to StrAllocC
 extern char * HTSACopy (char **dest, const char *src);
 extern char * HTSACat  (char **dest, const char *src);
 
- - - -

Case-insensitive String Comparison

- +

+ +

+ Case-insensitive String Comparison +

+

The usual routines (comp instead of cmp) had some problem. -

 extern int strcasecomp  (const char *a, const char *b);
 extern int strncasecomp (const char *a, const char *b, int n);
 
- -

String Comparison with Wild Card Match

- -String comparison function for file names with one wildcard * in the -template. Arguments are: - +

+ String Comparison with Wild Card Match +

+

+String comparison function for file names with one wildcard * in the template. +Arguments are:

-
tmpl -
is a template string to match the name against. agaist, may -contain a single wildcard character * which matches zero or more -arbitrary characters. -
name -
is the name to be matched agaist the template. +
+ tmpl +
+ is a template string to match the name against. agaist, may contain a single + wildcard character * which matches zero or more arbitrary characters. +
+ name +
+ is the name to be matched agaist the template.
- -Returns empty string ("") if perfect match, pointer to part matched by -wildcard if any, or NULL if no match. This is basically the same as -YES if match, else NO. - +

+Returns empty string ("") if perfect match, pointer to part matched by wildcard +if any, or NULL if no match. This is basically the same as YES if match, +else NO.

 extern char * HTStrMatch	(const char * tmpl, const char * name);
 extern char * HTStrCaseMatch	(const char * tmpl, const char * name);
 
- -

Case-insensitive strstr

- +

+ Case-insensitive strstr +

+

This works like strstr() but is not case-sensitive. -

 extern char * strcasestr (char * s1, char * s2);
 
- -

Strip white space off a string

- -Return value points to first non-white character, or to '/0' if -none. All trailing white space is OVERWRITTEN with zero. - +

+ Strip white space off a string +

+

+Return value points to first non-white character, or to '/0' if none. All +trailing white space is OVERWRITTEN with zero.

 extern char * HTStrip (char * s);
 
-
 #endif
 
- -
+

+


-@(#) $Id: HTString.html,v 2.31 1996/04/12 17:48:53 frystyk Exp $ + @(#) $Id: HTString.html,v 2.32 1996/05/20 15:07:15 frystyk Exp $
- - +