Skip to content
New issue

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

Compare seems not correct #269

Closed
AielloChan opened this issue Mar 20, 2024 · 1 comment · Fixed by #271
Closed

Compare seems not correct #269

AielloChan opened this issue Mar 20, 2024 · 1 comment · Fixed by #271

Comments

@AielloChan
Copy link
Contributor

image
import { compare as fastCompare } from '@napi-rs/pinyin';

const a = '你好';
const b = '123';

console.log(fastCompare(a, b), fastCompare(b, a)); // -1 -1
@AielloChan
Copy link
Contributor Author

compare('饿', '鹅') // -1 Wrong

鹅é、饿è

ē、é、ě、è

So compare('饿', '鹅') need to be 1

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 a pull request may close this issue.

1 participant