F
feck
Hi,
Got a query, don't know if anyone would be kind enough to help...
I have to either match a string exactly eg
"123456789ABCDEF123456789ABCDEF" == "123456789ABCDEF123456789ABCDEF",
or if a packed byte bit mask is set mask1 = 1, mask2 = 4,
"123456789ABCDEF123456789ABCDEF" == "123456789ABCDEF1234x6789ABCDEx".
The mask means that the character at x can match either the original
number, or a set character ('x'). The original string can be up to 80
chars long with 10 8-bit bytes containg the masks.
I have done this, by a plodding for loop with lots of ifs, alas it's
untidy and slow. Any pointers to tidy & speed would be a great help.
Thank-you.
Got a query, don't know if anyone would be kind enough to help...
I have to either match a string exactly eg
"123456789ABCDEF123456789ABCDEF" == "123456789ABCDEF123456789ABCDEF",
or if a packed byte bit mask is set mask1 = 1, mask2 = 4,
"123456789ABCDEF123456789ABCDEF" == "123456789ABCDEF1234x6789ABCDEx".
The mask means that the character at x can match either the original
number, or a set character ('x'). The original string can be up to 80
chars long with 10 8-bit bytes containg the masks.
I have done this, by a plodding for loop with lots of ifs, alas it's
untidy and slow. Any pointers to tidy & speed would be a great help.
Thank-you.