How to find a binary string in binary string
Posted: Mon Mar 16, 2009 11:01 pm
Hi,
I am programming in C, and I want to find (the position of) a binary string in another binary string. Normally strstr() can be used, but it fails here because it can only use with a null-terminated-string.
So is there any available C function/library for this? Or we can find some implementations doing this somewhere?
(I am on Linux, using gcc and glibc)
Thanks,
Jun
I am programming in C, and I want to find (the position of) a binary string in another binary string. Normally strstr() can be used, but it fails here because it can only use with a null-terminated-string.
So is there any available C function/library for this? Or we can find some implementations doing this somewhere?
(I am on Linux, using gcc and glibc)
Thanks,
Jun