Trim in Go

Posted by GoDoc
Public (Editable by Users)

Trim returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed.

Go
Edit
package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Print(strings.Trim("¡¡¡Hello, Gophers!!!", "!¡"))
}