2017-02-26 22:23:06 -06:00

22 lines
481 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]
signature:
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"
```