mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-10-12 18:20:26 -04:00
24 lines
509 B
Markdown
24 lines
509 B
Markdown
---
|
|
title: trim
|
|
linktitle:
|
|
description: Returns a slice of a passed string with all leading and trailing characters from cutset removed.
|
|
godocref:
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-02-01
|
|
categories: [functions]
|
|
tags: [strings]
|
|
ns:
|
|
signature: ["trim INPUT CUTLIST"]
|
|
workson: []
|
|
hugoversion:
|
|
relatedfuncs: []
|
|
deprecated: false
|
|
---
|
|
|
|
`trim` returns a slice of the string with all leading and trailing characters contained in cutset removed.
|
|
|
|
```
|
|
{{ trim "++Batman--" "+-" }} → "Batman"
|
|
```
|