Added substring fn.
Added trim fn.