How is zero incorrect? If the 2nd string (not empty) is not in the 1st string, then there is no index, either, so zero is returned. This would be exactly the same situation. Are you saying that if a string doesn't exist in the other string, we should assign that a negative value as well?
Brian
|