antlrcs icon indicating copy to clipboard operation
antlrcs copied to clipboard

separator omitted when first argument is null or empty

Open rrs opened this issue 6 years ago • 0 comments

consider the template <["Wendy",,"Jane"]; separator=",", null=""> it will print Wendy,,Jane however the template <[,"Wendy","Jane"]; separator=",", null=""> will print Wendy,Jane and not ,Wendy,Jane

This is an issue for a template i have that builds a csv output, when the first column happens to contain null values. A work around is to use null=" " however that means there would be no distinction between "" and " "

Further to that if i have a dictionary i wish to print in a line and use <d.keys:{k | <d.(k)>}; separator=",", null=" "> then there is nothing i can do to keep the leading comma as the dictionary lookup resolves to "" even if the value is null and therefore doesn't count towards the null replacement.

rrs avatar Mar 16 '18 18:03 rrs