We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Support converting from STRING as a float to INT as well. Currently it would be failure to do something like the below code...
To Reproduce
package main import ( "fmt" gu "github.com/gookit/goutil" gmt "github.com/gookit/goutil/mathutil" ) func main() { fmt.Println(gmt.IntOrDefault("12.000", 0)) //Failed --> default to 0 fmt.Println(gu.Int("12.000")) //Failed --> return 0 fmt.Println(gmt.IntOrErr("12.000")) //return: 0 strconv.Atoi: parsing "12.000": invalid syntax }
The text was updated successfully, but these errors were encountered:
Done in #180
Sorry, something went wrong.
inhere
No branches or pull requests
Describe the bug
Support converting from STRING as a float to INT as well.
Currently it would be failure to do something like the below code...
To Reproduce
The text was updated successfully, but these errors were encountered: