in reply to substring function

use the <code> tag when you post your code!