Skip to content

Conversation

@skynightz
Copy link

It would be great to be able to specify a string or a character to customize negative sign of a value. It's using the character "hypen minus" (decimal code: 45) in your code and we want to use the "minus sign" (decimal code: 8722) instead.

@Skywalker13
Copy link

ping.. please

@MikeMcl
Copy link
Owner

MikeMcl commented May 9, 2021

It's reasonable but the changes to the behaviour of toString would break creating a BigNumber from a BigNumber's toString value, which is unacceptable.

@skynightz
Copy link
Author

skynightz commented May 10, 2021

I modified also the toString method because it was used in toFormat for the "-Infinity" case. it wasn't formating the string in this case. I can modify my PR to change only the toFormat method.

@skynightz
Copy link
Author

I reverted my changes in toString method and handle the case for negative infinity in toFormat method.

@MikeMcl
Copy link
Owner

MikeMcl commented May 10, 2021

Okay, I'll take a look presently.

@skynightz skynightz changed the title Enhancement: Add support for custom minus sign in toFormat and toString method Enhancement: Add support for custom minus sign in toFormat method May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants