GIR
Member
Hello,
I have a string which has data appended to it, and it displayed in a textview.
The problem is I need to display only the last 10 items appended to prevent fresh data being appended out-of-view.
The data is appended with eol, so I can spilt the string at that point.
I know I can use :
which nicely places the string into the substring, so my question is:
How can I append only the last 10 items from the substring back into aString?
I've been all over google search trying to find a solution, but all my attempts have either given errorr in Eclipse, or thrown a force-close.
One way I tried was with:
Which is an iteration algorithm I frequently use in python, but is not successful in Java.
Many thanks for any suggestions.
GIR
I have a string which has data appended to it, and it displayed in a textview.
The problem is I need to display only the last 10 items appended to prevent fresh data being appended out-of-view.
The data is appended with eol, so I can spilt the string at that point.
I know I can use :
Code:
String aList[] = aString.split(eol);
How can I append only the last 10 items from the substring back into aString?
I've been all over google search trying to find a solution, but all my attempts have either given errorr in Eclipse, or thrown a force-close.
One way I tried was with:
Code:
aStringLength = aString.length;
int x = 0;
x=x+20
while(x != aStringLength){
aTemp = aTemp +(aList[x]);
x=x+1;
}
Many thanks for any suggestions.
GIR