Skip to content

strings: TrimLeft bug if cutset contains .h #5622

@gopherbot

Description

@gopherbot

by victorvieux:

When the cutset of strings.TrimLeft() contains ".h", all the leading h are
removed.

What steps will reproduce the problem?
http://play.golang.org/p/bTtOmZiVpp

What is the expected output?
.wh.httpd httpd
.wh.chown chown
.wh.hhhhh hhhhh


What do you see instead?
.wh.httpd ttpd
.wh.chown chown
.wh.hhhhh 


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Mac OS

Which version are you using?  (run 'go version')
go1.1 darwin/amd64

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