strv: allow to set separator NULL in strv_split() or strv_split_full()
This commit is contained in:
parent
af0b60b37c
commit
2c3a11d86e
|
@ -253,6 +253,9 @@ char **strv_split_full(const char *s, const char *separator, bool quoted) {
|
|||
|
||||
assert(s);
|
||||
|
||||
if (!separator)
|
||||
separator = WHITESPACE;
|
||||
|
||||
s += strspn(s, separator);
|
||||
if (isempty(s))
|
||||
return new0(char*, 1);
|
||||
|
|
Loading…
Reference in a new issue