mirror of https://github.com/gohugoio/hugo
24 lines
581 B
Markdown
24 lines
581 B
Markdown
---
|
|
title: strings.TrimRight
|
|
description: Returns the given string, removing trailing characters specified in the cutset.
|
|
categories: []
|
|
keywords: []
|
|
params:
|
|
functions_and_methods:
|
|
aliases: []
|
|
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
|
|
```
|