Skip to content

strings: strings.Trim trims too much strings #19172

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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