Skip to content

Rename digitToInt as hexDigitToInt, create new decimal-only digitToInt #25

@milesfrain

Description

@milesfrain

We have these functions:

  • isDigit - matches 0..9
  • isHexDigit - matches 0..9, a..f, A..F
  • digitToInt - converts hex digits 0..9, a..f, A..F to 0..15

Would it make more sense to rename digitToInt to hexDigitToInt and create a new digitToInt that only converts decimal digits:

  • digitToInt - converts decimal digits 0..9 to 0..9
  • hexDigitToInt - converts hex digits 0..9, a..f, A..F to 0..15

This issue came up in this slack discussion:
https://functionalprogramming.slack.com/archives/C717K38CE/p1589481039128200

Metadata

Metadata

Assignees

Labels

purs-0.14A reminder to address this issue or merge this PR before we release PureScript v0.14.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions