mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
@@ -1,26 +1,20 @@
|
||||
---
|
||||
title: len
|
||||
description: Returns the length of a string, slice, map, or collection.
|
||||
categories: [functions]
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
function:
|
||||
action:
|
||||
aliases: []
|
||||
related:
|
||||
- functions/strings/Count
|
||||
- functions/strings/CountRunes
|
||||
- functions/strings/CountWords
|
||||
- functions/strings/RuneCount
|
||||
returnType: int
|
||||
signatures: [len INPUT]
|
||||
relatedFunctions:
|
||||
- len
|
||||
- strings.Count
|
||||
- strings.CountRunes
|
||||
- strings.CountWords
|
||||
- strings.RuneCount
|
||||
signatures: [len VALUE]
|
||||
aliases: [/functions/len]
|
||||
---
|
||||
|
||||
{{% readfile file="/functions/_common/go-template-functions.md" %}}
|
||||
|
||||
With a string:
|
||||
|
||||
```go-html-template
|
||||
@@ -53,3 +47,5 @@ You may also determine the number of pages in a collection with:
|
||||
```go-html-template
|
||||
{{ site.RegularPages.Len }} → 42
|
||||
```
|
||||
|
||||
{{% include "functions/go-template/_common/text-template.md" %}}
|
||||
|
Reference in New Issue
Block a user