find and substr test for string