Suppose let the string be "This is a long string that I want to split" and the fixed length be 10.If the size of the word makes the part of the string to exceed the fixed the length then that should be considered into the next part of the string
Now the result I am looking for is :
"This is a ", "long" , "string " , "that I want" , "to split"
I have been searching a lot for this functionality but couldn't get it right