}
/**
- * @brief It splits a string `str` into a separate substrings split on `sep` character.
+ * @brief It splits a string `str` into a separate substrings split on `sep` character. Leading and trailing spaces are removed.
*
* @param list a list used to populate split results
* @param str a string to split
buf.c_str()[q - p] = '\0';
p = q + 1; // next element
}
+ /* The following cleanup has been added to split strings such as
+ * item1: value => 'item1', 'value' and not 'item1', ' value'
+ */
+ strip_leading_space(buf.c_str());
+ strip_trailing_junk(buf.c_str());
+
// in buf we have splitted string part
const char * s = bstrdup(buf.c_str());
list.append((void*)s);
if (ctx) bfuncs->DebugMessage ( ctx, __FILE__, __LINE__, level, "%s " msg, PLUGINPREFIX, var1, var2, var3, var4 );
#define DMSG6(ctx,level,msg,var1,var2,var3,var4,var5,var6) \
if (ctx) bfuncs->DebugMessage ( ctx, __FILE__, __LINE__, level, "%s " msg, PLUGINPREFIX, var1, var2, var3, var4, var5, var6 );
+#define DMSG7(ctx,level,msg,var1,var2,var3,var4,var5,var6,var7) \
+ if (ctx) bfuncs->DebugMessage ( ctx, __FILE__, __LINE__, level, "%s " msg, PLUGINPREFIX, var1, var2, var3, var4, var5, var6, var7);
/* fixed debug level definitions */
#define D1 1 /* debug for every error */