How to split a string into an tokens and then save them in an array? Specifically, I have a string "abc/qwe/jkh". I want to separate "/", and then save the tokens into an array. Output will be such that array[0] = "abc" array[1] = "qwe" array[2] = "jkh" please help me