JuliaMath / JuliaMath/FixedPointDecimals.jl

Parse Int64 supports whitespace, parse FixedDecimal does not

Open
#55 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
37
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Example:
```
julia> parse(Int64, " 5 ")
5

julia> parse(FixedDecimal{Int64,2}, " 5.0 ")
ERROR: ArgumentError: invalid digit: ' '

julia> parse(FixedDecimal{Int64,2}, "5.0")
FixedDecimal{Int64,2}(5.00)

julia> parse(Float64, " 3.14 ")
3.14

julia> parse(Float64, " 3 . 14 ")
ERROR: ArgumentError: cannot parse " 3 . 14 " as Float64
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.