This may not be a solution, but I found that its safer to parse incoming strings using INSTR rather than LEFT or MID functions. Then leading junk on the string is ignored, rather than causing a false negative.
Eg if looking for "POST" in the string buffer, use
dim btemp as byte
btemp = INSTR(buffer,"POST")
if btemp > 0 then
'Post will be detected here, even if the buffer contains "xxxPOSTyyy"
end if
Means you cannot use SELECT...CASE, but it seems better for other reasons.
↧