odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.17k stars 550 forks source link

Strike incorrect note from `parse_f64_prefix` doc #3678

Closed Feoramund closed 1 month ago

Feoramund commented 1 month ago

During the development of #3677, I followed the API doc for parse_f64_prefix as described, but I eventually found that something like "32.0 hellope" would return true, despite what the returns comment said. I thought this was a bug and saved it for later. When I started digging around, I got the sense that it was the documentation that was in error and not the procedure itself.

Of course, I then recalled that the name of the proc ends in _prefix.

I've fixed the documentation comment and added a test case to show that it's supposed to return true in that case. Hopefully this brings a bit of clarity to the situation.