How to Split up a string into pieces of the given/specified length ????
807580Sep 1 2009 — edited Sep 12 2009Hi
I've a large string with more than 1000 characters. I need to split the strings based on the given length basically length as parameter.
For example,
if i give length as 50, i need to split the characters of 50 characters each with total 20 strings
if i give length as 225, i need to split the characters of 225 characters each with total 5 Strings (4 strings with 225 characters and balance 100
characters with 1 string)
Can anyone please tell me how to achieve in Java?
Thanks,
Kathir