antlrcs
antlrcs copied to clipboard
separator omitted when first argument is null or empty
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.