Quote:
Originally Posted by ownedbycats
Question:
[...]
Code:
program:
genre = $#subjects;
colls = strcat(
$#booktype,
if 'overdrive' in approximate_formats() then 'Loans,' fi,
if $$#purchasecost == '0.00' then 'Freebies,' fi,
if '^Horses$' inlist genre then 'Horses,' fi,
if '^Cozy Mystery$' inlist genre then 'Cozy Mysteries,' fi,
if '^(Fantasy|Science Fiction|Paranormal)$' inlist genre then 'Fantasy & Sci-Fi,' fi,
if 'Omnibus' in $#admintags then 'Omnibuses' fi
);
new_colls = list_union($#kobocoll, colls, ',')
How do I get #booktype to also return a comma?
|
Add the comma to the strcat().
Code:
program:
genre = $#subjects;
colls = strcat(
$#booktype, ',',
[...]
Don't worry about the possibility of colls ending in a comma. The list_union() will remove it.