1 #ifndef __EVIL_STRING_H__ 2 #define __EVIL_STRING_H__ 3 4 5 /** 6 * @file evil_string.h 7 * @brief The file that provides functions ported from Unix in string.h. 8 * @defgroup Evil_String_Group String.h functions. 9 * @ingroup Evil 10 * 11 * This header provides functions ported from Unix in string.h. 12 * 13 * @{ 14 */ 15 16 17 /* 18 * string related functions 19 * 20 */ 21 22 /** 23 * @brief Locate a substring into a string, ignoring case. 24 * 25 * @param haystack The string to search in. 26 * @param needle The substring to find. 27 * @return 28 * 29 * This function locates the string @p needle into the string @p haystack, 30 * ignoring the case of the characters. It returns apointer to the 31 * beginning of the substring, or NULL if the substring is not found. 32 * If @p haystack or @p needle are @c NULL, this function returns @c NULL. 33 * 34 * Conformity: Non applicable. 35 * 36 * Supported OS: Windows XP. 37 */ 38 EAPI char *strcasestr(const char *haystack, const char *needle); 39 40 /** 41 * @brief Implements the strsep function which is used to separate strings. 42 * 43 * @param stringp The pointer to the string to search in. 44 * @param delim The delimiter that contains characters used to find the next token. 45 * @return a pointer to the next token or NULL; 46 * 47 * The strsep() function locates, in the string referenced by *stringp, the 48 * first occurrence of any character in the string delim (or the terminating 49 * `\0' character) and replaces it with a `\0'. The location of the next 50 * character after the delimiter character (or NULL, if the end of the 51 * string was reached) is stored in *stringp. The original value of 52 * stringp is returned. 53 * 54 * An ``empty'' field (i.e., a character in the string delim occurs as the 55 * first character of *stringp) can be detected by comparing the location 56 * referenced by the returned pointer to `\0'. 57 58 * If *stringp is initially NULL, strsep() returns NULL. 59 * 60 * This function is from LibGW32C. 61 * @since 1.8 62 * 63 */ 64 EAPI char *strsep(char **stringp, const char *delim); 65 66 /** 67 * @} 68 */ 69 70 #endif /* __EVIL_STRING_H__ */ 71