I am trying to split a string based on length(example length 5) of the string. But I am having a issues with this substring(start, end) method. I get all substring which are of length 5. But if the last substring is less than 5 then I am not getting that last substring. But I need the last substring even if it is less than 5. I am wondering if some one can help me. Let me know if anything is not clear.
Looks like an "out-by-one" error. If you have a 26 letter String you appear only to take 5 letters off 5 times. You need some way of getting the 6th part.