|
Functions |
int | u_isblank (int c) |
| Returns 0 if c is neither a space or a tab, not-zero otherwise.
|
void | u_trim (char *s) |
| Removes leading and trailing blanks (spaces and tabs) from s .
|
int | u_isblank_str (const char *ln) |
| Returns 1 if ln is a blank string i.e. a string formed by ONLY spaces and/or tabs characters.
|
int | u_isnl (int c) |
| Returns 0 if c is neither a CR (\r) or a LF (\n), not-zero otherwise.
|
char * | u_strndup (const char *s, size_t len) |
| Dups the first len chars of s . Returns the dupped zero terminated string or NULL on error.
|
char * | u_strdup (const char *s) |
| Dups the supplied string s .
|
int | u_savepid (const char *pf) |
| Save the PID of the calling process to a file named pf (that should be a fully qualified path). Returns 0 on success, not-zero on error.
|
char * | u_sstrncpy (char *dst, const char *src, size_t size) |
| Safe string copy, see also the U_SSTRNCPY define Safe string copy which null-terminates the destination string dst before copying the source string src for no more than size bytes. Returns a pointer to the destination string dst.
|
void * | u_memdup (const void *src, size_t size) |
| Dups the memory block src of size size . Returns the pointer of the dup'd block on success, NULL on error.
|
int | u_tokenize (char *wlist, const char *delim, char **tokv, size_t tokv_sz) |
| tokenize the supplied wlist string
|
int | u_snprintf (char *str, size_t size, const char *fmt,...) |
| snprintf-like function that returns 0 on success and ~0 on error
|
int | u_path_snprintf (char *buf, size_t sz, char sep, const char *fmt,...) |
| snprintf-like function that handle path separator issues
|
int | u_data_is_bin (char *data, size_t sz) |
| Return 1 if the supplied buffer data has non-ascii bytes.
|