ListToCsv.Header (list_to_csv v1.0.0) View Source

ListToCsv.Header contains types and utilities for headers.

Link to this section Summary

Functions

Returns a list of header duplicated n times. Replace first # with current 1 base index.

Link to this section Types

Link to this section Functions

Specs

duplicate([t()], integer()) :: [t()]

Returns a list of header duplicated n times. Replace first # with current 1 base index.

Examples

iex> duplicate(["item#.name", "item#.size"], 2)
["item1.name", "item1.size", "item2.name", "item2.size"]

iex> duplicate(["item#.package#"], 3)
["item1.package#", "item2.package#", "item3.package#"]