I have a string like "How are you john?". I need to split the string based on user input index. The problem is words need not to split.
Example:
- Input Query : How are you john?
- Split Index : 5
I am getting output like this:
How are you john?
Expected output:
How
are
you
john?