Showing posts with label split the big string and add in next line. Show all posts
Showing posts with label split the big string and add in next line. Show all posts

Tuesday, May 10, 2011

Split the big String into words

//This method used to split the big text and add it to the next line
public String StringSplit( String text , int splitSize)
{

String finalString = "";
String dummyString =text;
for(int i=0;i<=text.length()/splitSize;i++)
{
if(dummyString.length()>=splitSize)
{
finalString+= dummyString.substring(0,splitSize) +"\n";
dummyString = dummyString.substring(splitSize);
}
else
finalString+= dummyString;

}
return finalString;
}

AddToAny

Contact Form

Name

Email *

Message *