Skip to content

strings: strings.Trim trims too much strings #19172

@timakin

Description

@timakin
package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Println(strings.Trim("2016-11-22T00:26:00+0000", "+0000"))
}

The result is 2016-11-22T00:26:, but I expected 2016-11-22T00:26:00.
Is this a bug or an expected one?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions