Back to Lo

Core Count

docs/data/core-count.md

1.53.0117 B
Original Source

Counts the number of elements in the collection that equal a given value.

go
lo.Count([]int{1, 5, 1}, 1)
// 2