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) stringParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | string | Input text or sequence. |
| cutset | string | Set 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.", ".")))}