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

String search #4

Closed
JesseEmond opened this issue Jul 24, 2014 · 2 comments
Closed

String search #4

JesseEmond opened this issue Jul 24, 2014 · 2 comments
Assignees

Comments

@JesseEmond
Copy link
Owner

JesseEmond commented Jul 24, 2014

Could be interesting to add the "string" value type to search. Would read an std::string and search for the sequence of characters (excluding the null terminator).

@JesseEmond JesseEmond self-assigned this Jul 24, 2014
@JesseEmond
Copy link
Owner Author

I think this should be done after a rework on #11 (maybe having classes that can have more advanced logic instead of a simple enum for value types).

@JesseEmond
Copy link
Owner Author

Let's not handle null terminators. If one really wants to insert a null terminator after the modified string, one can do the following hack: modify the string, search for an integer representing the last 3 chars of the modified string with the extra character that we want to replace, replace with the same first 3 chars but a \x00 as the fourth byte (basically handling the ending of the string as an integer). Hackish, but does the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant