char * substring(long start, long end) function

use: return a substring from index start to end both inclusive, for
invalid index return NULL (\0)