if (s[0] == '\0')
return res;
if (sep[0] == '\0') {
+ s = xbt_strdup(s);
xbt_dynar_push(res, &s);
return res;
}
}
#ifdef SIMGRID_TEST
+#include "xbt/str.h"
+
#define mytest(name, input, expected) \
xbt_test_add0(name); \
d=xbt_str_split_quoted(input); \
res = xbt_malloc(len);
p=res;
xbt_dynar_foreach(dyn,cpt,cursor) {
- if (cpt<dyn_len-1)
+ if ((int)cpt<dyn_len-1)
p+=sprintf(p,"%s%s",cursor,sep);
else
p+=sprintf(p,"%s",cursor);