Cleary 'FFF' is part of string 'FFF NNN JKK III LLL QQQ' and should return a result >= 0Indeed, and it does. However, the negation of result >= 0 is not if($result <= 0), which is what you wrote in your program. There is a value (0) that's both >= 0 and <= 0.
Use if ($result == -1) in your program.
In reply to Re^2: Substring comparison
by JavaFan
in thread Substring comparison
by schtinkfist893
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |