Watt-32 tcp/ip  2.2 dev-rel.10
Functions
strings.h File Reference

Go to the source code of this file.

Functions

char * _strlcpy (char *dst, const char *src, size_t len)
 Similar to strncpy(), but always returns 'dst' with 0-termination.
 
char * strreplace (int ch1, int ch2, char *str)
 Replace 'ch1' to 'ch2' in string 'str'.
 
size_t strntrimcpy (char *dst, const char *src, size_t len)
 Copy a string, stripping leading and trailing blanks (space/tab). More...
 
char * strrtrim (char *src)
 Trim trailing blanks (space/tab) from a string.
 
char * strltrim (const char *src)
 Return pointer to first non-blank (space/tab) in a string.
 
BYTE atox (const char *src)
 Convert hexstring "0x??" to hex. More...
 

Function Documentation

BYTE atox ( const char *  hex)

Convert hexstring "0x??" to hex.

Just assumes "??" are in the [0-9,a-fA-F] range. Don't call atox() unless they are or before checking for a "0x" prefix.

Definition at line 194 of file strings.c.

size_t strntrimcpy ( char *  dst,
const char *  src,
size_t  n 
)

Copy a string, stripping leading and trailing blanks (space/tab).

Note
This function does not work exactly like strncpy(), in that it expects the destination buffer to be at last (n+1) chars long.

Definition at line 277 of file strings.c.