We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompareNatural uses javascript-natural-sort to compare strings.
CompareNatural
Strings are not compared lexically as the docs say they should be.
For example:
> math.compareNatural('5', '10') -1 > '5' < '10' false
and
> math.compareNatural('10/11/2009', '10/12/2008') 1 > '10/11/2009' < '10/12/2008' true
Is this a bug or should we change the docs to say something like strings are compared in a sensible way?
strings are compared in a sensible way
(Note that the javascript operator < does lexical comparison on strings)
<
The text was updated successfully, but these errors were encountered:
Fixed #1065, #1121: Fixed wrong documentation of function `compareNat…
a389d34
…ural` and clarified the behavior for strings
Thanks, it's indeed an error in the documentation. I've updated the docs, see a389d34.
For reference, see also #1065.
Sorry, something went wrong.
No branches or pull requests
CompareNatural
uses javascript-natural-sort to compare strings.Strings are not compared lexically as the docs say they should be.
For example:
and
Is this a bug or should we change the docs to say something like
strings are compared in a sensible way
?(Note that the javascript operator
<
does lexical comparison on strings)The text was updated successfully, but these errors were encountered: