File: TrimLeft.md

package info (click to toggle)
hugo 0.157.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,672 kB
  • sloc: javascript: 31,888; ansic: 2,350; xml: 350; makefile: 195; sh: 110
file content (23 lines) | stat: -rw-r--r-- 573 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: strings.TrimLeft
description: Returns the given string, removing leading characters specified in the cutset.
categories: []
keywords: []
params:
  functions_and_methods:
    aliases: []
    returnType: string
    signatures: [strings.TrimLeft CUTSET STRING]
aliases: [/functions/strings.trimleft]
---

```go-html-template
{{ strings.TrimLeft "a" "abba" }} → bba
```

The `strings.TrimLeft` function converts the arguments to strings if possible:

```go-html-template
{{ strings.TrimLeft 21 12345 }} → 345 (string)
{{ strings.TrimLeft "rt" true }} → ue
```