Panty v0.1.1 Panty.Collection
Collection utilities
Link to this section Summary
Functions
Returns the list dropping its last element
Get intersection from given lists
Get index of a substring from a pattern
Link to this section Functions
Get intersection from given lists.
Examples
iex> Collection.intersection([1, 2, 3, 4], [2, 3])
[2, 3]
iex> Collection.intersection(["index", "carousel", "header", "footer"], ["header", "footer"])
["header", "footer"]
Link to this function
substring_index(pattern, substring)
Get index of a substring from a pattern.
Examples
iex> Collection.string_find_index("abcdef", "cde")
2
iex> Collection.string_find_index("{% sections 'header' %}", "{% endschema %}")
nil