Worktual interview question

Given the Sentence and split them into words without using inbuilt split function