Implement substr() function and test cases
Implement first() and last() for string