Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members  

Miscellaneous Utilities

Miscellaneous Utilities. More...

Functions

char* psStrncpy (char* dest, char* src, size_t n)
 Copy at most n bytes from src into \dest. More...

char* psStrndup (char* s, size_t n)
 Duplicate at most n bytes of s. More...

char* psUStrncpy (char *dst, char *str, size_t n)
 Copy at most n Unicode characters from src into \dest. More...

char* psUStrndup (char* s, size_t n)
 Duplicate at most n Unicode characters of s. More...

char* psEraseWhiteBegin (char* str)
 Remove whitespace from beginning of str. More...

char* psEraseWhiteEnd (char* str)
 Remove whitespace from end of str. More...

char* psEraseWhite (char* str)
 Remove whitespace from beginning and end of str. More...


Detailed Description

Miscellaneous Utilities.


Function Documentation

char * psEraseWhite ( char * str )
 

Remove whitespace from beginning and end of str.

Parameters:
str   pointer to string

Returns:
str

Warning:
Modifies str.

char * psEraseWhiteBegin ( char * str )
 

Remove whitespace from beginning of str.

Parameters:
str   pointer to string

Returns:
str

Warning:
Modifies str.

char * psEraseWhiteEnd ( char * str )
 

Remove whitespace from end of str.

Parameters:
str   pointer to string

Returns:
str

Warning:
Modifies str.

char * psStrncpy ( char * dest,
char * src,
size_t n )
 

Copy at most n bytes from src into \dest.

Operates similar to strncpy() except that it always null-terminates dest.

Parameters:
dest   pointer to destination string.
src   pointer to source string.
n   maximum number of characters to copy.

Returns:
a pointer to dest on success or NULL on failure.

char * psStrndup ( char * s,
size_t n )
 

Duplicate at most n bytes of s.

Combination of strdup() and strncpy() with the exception that it always null terminates the new string :).

Parameters:
s   pointer to string to duplicate.
n   maximum number of bytes to copy.

Returns:
a pointer to the new string on success or NULL on failure.

char * psUStrncpy ( char * dst,
char * str,
size_t n )
 

Copy at most n Unicode characters from src into \dest.

Operates similar to strncpy() except that it always null-terminates dest and handles Unicode characters (sort of :).

Parameters:
dest   pointer to destination string.
src   pointer to source string.
n   maximum number of characters to copy.

Warning:
Real Unicode support is really needed.

Returns:
a pointer to dest on success or NULL on failure.

char * psUStrndup ( char * s,
size_t n )
 

Duplicate at most n Unicode characters of s.

Combination of strdup() and strncpy() with the exception that it always null terminates the new string and handles Unicode characters (sort of) :).

Parameters:
s   pointer to string to duplicate.
n   maximum number of bytes to copy.

Warning:
Real Unicode support is really needed.

Returns:
a pointer to the new string on success or NULL on failure.


Generated at Mon Dec 11 22:46:31 2000 for Postscript Utility Library by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000