mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'
This commit is contained in:
@@ -10,14 +10,13 @@ signature:
|
||||
- "complement COLLECTION [COLLECTION]..."
|
||||
- "collections.Complement COLLECTION [COLLECTION]..."
|
||||
relatedfuncs: [intersect,symdiff,union]
|
||||
aliases: []
|
||||
---
|
||||
|
||||
To find the elements within `$c3` that do not exist in `$c1` or `$c2`:
|
||||
|
||||
```go-html-template
|
||||
{{ $c1 := slice 3 }}
|
||||
{{ $c2 := slice 4 5 }}
|
||||
{{ $c2 := slice 4 5 }}
|
||||
{{ $c3 := slice 1 2 3 4 5 }}
|
||||
|
||||
{{ complement $c1 $c2 $c3 }} → [1 2]
|
||||
|
Reference in New Issue
Block a user