Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trim error #20

Closed
xcwen opened this issue Jul 11, 2019 · 2 comments
Closed

trim error #20

xcwen opened this issue Jul 11, 2019 · 2 comments

Comments

@xcwen
Copy link

xcwen commented Jul 11, 2019

package main

import "github.com/syyongx/php2go"
import "fmt"

func main() {
        s := "13000"
        fmt.Printf("%s=>%s\n", s, php2go.Trim(s))

}

localhost:~$ go run a.go
13000=>13

@xcwen
Copy link
Author

xcwen commented Jul 11, 2019

maybe change like this :

	if len(characterMask) == 0 {
		mask = " \t\n\r\x00\x0B"
	} else {
		mask = characterMask[0]
	}

@syyongx
Copy link
Owner

syyongx commented Aug 1, 2019

Thanks for your feedback, the bug has been fixed.

@syyongx syyongx closed this as completed Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants