[][src]Function avr_libc::strsep

pub unsafe extern "C" fn strsep(arg1: *mut *mut i8, arg2: *const i8) -> *mut i8

\ingroup avr_string \fn char *strsep(char **sp, const char *delim) \brief Parse a string into tokens.

The strsep() function locates, in the string referenced by \p *sp, the first occurrence of any character in the string \p delim (or the terminating '\0' character) and replaces it with a '\0'. The location of the next character after the delimiter character (or \c NULL, if the end of the string was reached) is stored in \p *sp. An ``empty'' field, i.e. one caused by two adjacent delimiter characters, can be detected by comparing the location referenced by the pointer returned in \p *sp to '\0'.

\return The strsep() function returns a pointer to the original value of \p *sp. If \p *sp is initially \c NULL, strsep() returns \c NULL.