str.c File Reference

#include "nsd.h"

Functions

char * Ns_StrTrim (char *string)
char * Ns_StrTrimLeft (char *string)
char * Ns_StrTrimRight (char *string)
char * Ns_StrToLower (char *string)
char * Ns_StrToUpper (char *string)
char * Ns_Match (char *a, char *b)
char * Ns_NextWord (char *line)
char * Ns_StrNStr (char *string, char *substring)
char * Ns_StrCaseFind (char *string, char *substring)

Function Documentation

char* Ns_Match ( char *  a,
char *  b 
)

----------------------------------------------------------------------

Ns_Match --

Compare the beginnings of two strings, case insensitively. The comparison stops when the end of the shorter string is reached.

Results: NULL if no match, b if match.

Side effects: None.

----------------------------------------------------------------------

char* Ns_NextWord ( char *  line  ) 

----------------------------------------------------------------------

Ns_NextWord --

Return a pointer to first character of the next word in a string; words are separated by white space.

Results: A string pointer in the original string.

Side effects: None.

----------------------------------------------------------------------

char* Ns_StrCaseFind ( char *  string,
char *  substring 
)

char* Ns_StrNStr ( char *  string,
char *  substring 
)

----------------------------------------------------------------------

Ns_StrCaseStr --

Search for first substring within string, case insensitive.

Results: A pointer to where substring starts or NULL.

Side effects: None.

----------------------------------------------------------------------

char* Ns_StrToLower ( char *  string  ) 

----------------------------------------------------------------------

Ns_StrToLower --

All alph. chars in a string will be made to be lowercase.

Results: Same string as passed in.

Side effects: Will modify string.

----------------------------------------------------------------------

char* Ns_StrToUpper ( char *  string  ) 

----------------------------------------------------------------------

Ns_StrToUpper --

All alph. chars in a string will be made to be uppercase.

Results: Same string as pssed in.

Side effects: Will modify string.

----------------------------------------------------------------------

char* Ns_StrTrim ( char *  string  ) 

----------------------------------------------------------------------

Ns_StrTrim --

Trim leading and trailing white space from a string.

Results: A pointer to the trimmed string, which will be in the original string.

Side effects: May modify passed-in string.

----------------------------------------------------------------------

char* Ns_StrTrimLeft ( char *  string  ) 

----------------------------------------------------------------------

Ns_StrTrimLeft --

Trim leading white space from a string.

Results: A pointer to the trimmed string, which will be in the original string.

Side effects: None.

----------------------------------------------------------------------

char* Ns_StrTrimRight ( char *  string  ) 

----------------------------------------------------------------------

Ns_StrTrimRight --

Trim trailing white space from a string.

Results: A pointer to the trimmed string, which will be in the original string.

Side effects: The string will be modified.

----------------------------------------------------------------------


Generated on Tue Sep 4 19:58:56 2007 by  doxygen 1.5.1