mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
``` git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash ``` Closes #11925
This commit is contained in:
28
docs/content/en/functions/strings/TrimRight.md
Normal file
28
docs/content/en/functions/strings/TrimRight.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: strings.TrimRight
|
||||
description: Returns the given string, removing trailing characters specified in the cutset.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
aliases: []
|
||||
related:
|
||||
- functions/strings/Chomp
|
||||
- functions/strings/Trim
|
||||
- functions/strings/TrimLeft
|
||||
- functions/strings/TrimPrefix
|
||||
- functions/strings/TrimSuffix
|
||||
returnType: string
|
||||
signatures: [strings.TrimRight CUTSET STRING]
|
||||
aliases: [/functions/strings.trimright]
|
||||
---
|
||||
|
||||
```go-html-template
|
||||
{{ strings.TrimRight "a" "abba" }} → abb
|
||||
```
|
||||
|
||||
The `strings.TrimRight` function converts the arguments to strings if possible:
|
||||
|
||||
```go-html-template
|
||||
{{ strings.TrimRight 54 12345 }} → 123 (string)
|
||||
{{ strings.TrimRight "eu" true }} → tr
|
||||
```
|
Reference in New Issue
Block a user