fsprojects / fsprojects/FSharpPlus
Scan padding and length specifiers properly
Open
Nobody has claimed this yet.
enhancement
fix
- Dominant language
- F#
- Stars
- 941
- Forks
- 106
- PR merge metrics
- No merged PRs in 30d
Description
Description
%02d, %5.2f, % i
Repro steps
#r "nuget:FSharpPlus"
FSharpPlus.Parsing.trySscanf "%02d" "13"
FSharpPlus.Parsing.trySscanf "%5.2f" "313.2"
FSharpPlus.Parsing.trySscanf "% i" "13"
Expected behavior
Some 13
Some 313.2
Some 13
Actual behavior
None
None
None
Known workarounds
No
Related information
- Operating system: Windows
- Version: 1.1.7
- .NET Runtime, CoreCLR or Mono Version: F# Interactive version 11.4.2.0 for F# 5.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with FSharpPlus.Parsing.trySscanf and reproduce the three format-string cases from the issue. Check how padding, length, precision, and whitespace in %02d, %5.2f, and % i are handled, then add coverage showing the expected Some results for all three inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100