PT Gajah Tunggal interview question

Create the substring function without using the built-in substring function