AST_STRSEP_UNESCAPE unescapes '\' sequences.
AST_STRSEP_ALL does all of the above processing.
\return The next token or NULL if done or if there are more than 8 levels of
- nested quotes.
+ nested quotes. If provided an empty string, will return the empty string.
This function acts like strsep with three exceptions...
The separator is a single character instead of a string.
AST_STRSEP_UNESCAPE unescapes '\' sequences.
AST_STRSEP_ALL does all of the above processing.
\return The next token or NULL if done or if there are more than 8 levels of
- nested quotes.
+ nested quotes. If provided an empty string, will return the empty string.
*/
char *ast_strsep_quoted(char **s, const char sep, const char quote, uint32_t flags);
char stack[8];
if (ast_strlen_zero(st)) {
- return NULL;
+ *iss = NULL;
+ return st;
}
memset(stack, 0, sizeof(stack));
const char qstr[] = { quote };
if (ast_strlen_zero(st)) {
- return NULL;
+ *iss = NULL;
+ return st;
}
memset(stack, 0, sizeof(stack));