Standard library / strings

strings.TrimLeft()

Removes leading runes in cutset; stops at the first nonmember. Expected stdout: 'go.\n'.

Formal Syntax & Structure

go syntaxgo
func TrimLeft(s, cutset string) string

Parameters & Attributes

NameTypeDescription
sstringInput text or sequence.
cutsetstringSet of code points to remove from the indicated ends.

Return Value

string

Removes leading runes in cutset; stops at the first nonmember.

Working Example

Example Snippetgo
package main
import (  "fmt"  "strings")
func main() {  fmt.Println(string(strings.TrimLeft("..go.", ".")))}
Go Reference