Functions
String.h functions.

This header provides functions ported from Unix in string.h. More...

Functions

EVIL_API char * strcasestr (const char *haystack, const char *needle)
 Locate a substring into a string, ignoring case. More...
 
EVIL_API char * strsep (char **stringp, const char *delim)
 Implements the strsep function which is used to separate strings. More...
 

Detailed Description

This header provides functions ported from Unix in string.h.

Function Documentation

◆ strcasestr()

EVIL_API char * strcasestr ( const char *  haystack,
const char *  needle 
)

Locate a substring into a string, ignoring case.

Parameters
haystackThe string to search in.
needleThe substring to find.
Returns

This function locates the string needle into the string haystack, ignoring the case of the characters. It returns apointer to the beginning of the substring, or NULL if the substring is not found. If haystack or needle are NULL, this function returns NULL.

Conformity: Non applicable.

Supported OS: Windows XP.

◆ strsep()

EVIL_API char * strsep ( char **  stringp,
const char *  delim 
)

Implements the strsep function which is used to separate strings.

Parameters
stringpThe pointer to the string to search in.
delimThe delimiter that contains characters used to find the next token.
Returns
a pointer to the next token or NULL;

The strsep() function locates, in the string referenced by *stringp, the first occurrence of any character in the string delim (or the terminating ‘\0’ character) and replaces it with a ‘\0’. The location of the next character after the delimiter character (or NULL, if the end of the string was reached) is stored in *stringp. The original value of stringp is returned.

An `‘empty’' field (i.e., a character in the string delim occurs as the first character of *stringp) can be detected by comparing the location referenced by the returned pointer to ‘\0’.

If *stringp is initially NULL, strsep() returns NULL.

This function is from LibGW32C.

Since
1.8