mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-03 01:23:54 -05:00
22 lines
548 B
Markdown
22 lines
548 B
Markdown
---
|
|
title: strings.Trim
|
|
description: Returns the given string, removing leading and trailing characters specified in the cutset.
|
|
categories: []
|
|
keywords: []
|
|
action:
|
|
aliases: [trim]
|
|
related:
|
|
- functions/strings/Chomp
|
|
- functions/strings/TrimSpace
|
|
- functions/strings/TrimLeft
|
|
- functions/strings/TrimPrefix
|
|
- functions/strings/TrimRight
|
|
- functions/strings/TrimSuffix
|
|
returnType: string
|
|
signatures: [strings.Trim INPUT CUTSET]
|
|
aliases: [/functions/trim]
|
|
---
|
|
|
|
```go-html-template
|
|
{{ trim "++foo--" "+-" }} → foo
|
|
```
|