Microsoft interview question

How to split a string without using the split method?