HDK
|
#include "SYS_API.h"
#include "SYS_Inline.h"
#include "SYS_Types.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | WRAP_NULLTEST_C(FUNCTION, CONST) |
#define | WRAP_NULLTEST(FUNCTION) |
#define | SYS_IS_WRAPPER(TEST) |
#define | CREATE_SYSisspace(TYPE) |
Functions | |
char * | SYSstrtok (char *string, const char *delimit, char **context) |
size_t | SYSstrlcpy (char *dest, const char *src, size_t size) |
size_t | SYSstrlcat (char *dest, const char *src, size_t size) |
int | SYSstrcasecmp (const char *a, const char *b) |
int | SYSstrcmp (const char *a, const char *b) |
int | SYSstrncasecmp (const char *a, const char *b, size_t n) |
char * | SYSstrcasestr (const char *haystack, const char *needle) |
Replacement for strcasestr, since no equivalent exists on Win32. More... | |
char * | SYSstrndup (const char *s, size_t n) |
#define CREATE_SYSisspace | ( | TYPE | ) |
Definition at line 433 of file SYS_String.h.
#define SYS_IS_WRAPPER | ( | TEST | ) |
Definition at line 367 of file SYS_String.h.
#define WRAP_NULLTEST | ( | FUNCTION | ) |
Definition at line 258 of file SYS_String.h.
#define WRAP_NULLTEST_C | ( | FUNCTION, | |
CONST | |||
) |
Definition at line 249 of file SYS_String.h.
Definition at line 220 of file SYS_String.h.
Replacement for strcasestr, since no equivalent exists on Win32.
Definition at line 290 of file SYS_String.h.
Definition at line 237 of file SYS_String.h.
|
inline |
The following implements the strlcpy() function from OpenBSD. The differences between strlcpy() and strncpy() are:
Definition at line 205 of file SYS_String.h.
|
inline |
The semantics for strncpy() leave a little to be desired
The size is the size of the buffer, not the portion of the sub-string to copy. If you want to only copy a portion of a string, make sure that the size
passed in is one larger than the length of the string since SYSstrlcpy() will always ensure the string is null terminated.
It is invalid to pass a size of 0.
Examples:
Definition at line 180 of file SYS_String.h.
Definition at line 273 of file SYS_String.h.
|
inline |
Definition at line 332 of file SYS_String.h.
|
inline |
A standard name for a strtok that doesn't maintain state between calls. This version is thus both reentrant and threadsafe. SYSstrtok parses a string into a sequence of tokens. On the first call to SYSstrtok, the string to be parsed must be specified as the parameter 'string'. This parameter will be modified (destroying your copy). 'delimit' specifies an array of single characters that will be used as delimiters. 'context' is a char * variable used internally by SYSstrtok to maintain context between calls. Subsequent calls must specify the same unchanged context variable as the first call. To use SYSstrtok, on the first call first pass in your string as the parameter 'string'; on subsequent calls, pass it in as nullptr. SYSstrtok returns non-empty strings pointing to the first non-delimiter character of each token, or nullptr if no further tokens are available. Example:
Definition at line 106 of file SYS_String.h.