Back to Lo

Core Hasprefix

docs/data/core-hasprefix.md

1.53.0128 B
Original Source

Returns true if a collection starts with the given prefix slice.

go
lo.HasPrefix([]int{1, 2, 3, 4}, []int{1, 2})
// true