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

sais breaks if string starts with \0 #21

Open
faassen opened this issue Jan 9, 2025 · 1 comment
Open

sais breaks if string starts with \0 #21

faassen opened this issue Jan 9, 2025 · 1 comment

Comments

@faassen
Copy link
Collaborator

faassen commented Jan 9, 2025

I noticed that if you try to build a sais (and thus fmindex) with a string that starts with \0 things break. I figured a way around this in my code, but I wanted to leave this report here.

@faassen
Copy link
Collaborator Author

faassen commented Jan 10, 2025

It would be nice to support this as it would let me write efficient starts with, ends with and equals searches. That is, if I want to look for the text "foo", "\0foo" would look for starts with, "foo\0" would look for ends with, and "\0foo\0" would look for exact identity. If the whole text cannot start with \0, then the starts with and equals searches cannot be implemented this way, as there would be no preceding \0.

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

No branches or pull requests

1 participant