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

Add host functions for searching bytes and strings #1101

Open
leighmcculloch opened this issue Oct 7, 2023 · 0 comments
Open

Add host functions for searching bytes and strings #1101

leighmcculloch opened this issue Oct 7, 2023 · 0 comments
Labels
hostfunction Work on specific host functions

Comments

@leighmcculloch
Copy link
Member

What problem does your feature solve?

Be able to search string and bytes values without loading the values into the guest.

What would you like to see?

The addition of host functions:

  • bytes_first_index – Given a bytes, and a search bytes, return the first index of where the search bytes begins or void.
  • bytes_last_index – Given a bytes, and a search bytes, return the last index of where the search bytes begins or void.
  • string_first_index – Given a string, and a search string, return the first index of where the search string begins or void.
  • string_last_index – Given a string, and a search string, return the last index of where the search string begins or void.

What alternatives are there?

Load the values into the guest and do the searches guest side.

@anupsdf anupsdf added the hostfunction Work on specific host functions label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hostfunction Work on specific host functions
Projects
None yet
Development

No branches or pull requests

3 participants
@leighmcculloch @anupsdf and others