fixed8: remove trailing zeroes from string representation
Add some testcases from `dev` branch (with less than zero case added) and remove useless trailing zeroes from the resulting string.
This commit is contained in:
parent
d5d570f793
commit
c67217159f
3 changed files with 3 additions and 3 deletions
|
@ -34,7 +34,7 @@ func (f Fixed8) String() string {
|
|||
for i := len(str); i < 8; i++ {
|
||||
buf.WriteRune('0')
|
||||
}
|
||||
buf.WriteString(str)
|
||||
buf.WriteString(strings.TrimRight(str, "0"))
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue