Android Question CSBuilder and Trim

peacemaker

Expert
Licensed User
Longtime User
HI, All

If to Append texts into a CSbuilder line by line in a loop with the trailing space... is it possible to remove\replace or trim the result before applying the builder ?

I don't need the last space at the end.
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
No, Erel.
If it's a loop when the space is added to the end of each line. When loop is interrupted - the latest space must be removed :(
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
you can trim the line in the loop!
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
cs.Append is used inside the loop. During the loop - the cs collects images, links, texts... delimited by the spaces, so the latest space is a part of the CSBuilder object.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I delimite cs' appended parts by the spaces, but the latest space is not needed, it influences to the container size.
So, editing CSBuilder is not possible, as i understand, and need _not_to_append the space.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Can't you add items in the form space+item instead of item+space? This way you need just to init the cs with a no-leading space item than add as may items as you need with your loop and the end result will be a cs not space terminated.
 
Upvote 0
Top