Capy-Bearer Documentation

Get unique strings

lib call

Capy

function unique(items : dval) dval

Description

unique keeps the first copy of each string in a list-shaped dval.

The result keeps input order. This function does not change items.

Return Values

This function returns a new list-shaped dval.

Example

Capy

var items := split("one,two,one", ",")
print(join(unique(items), ","), "\n")