peacemaker Expert Licensed User Longtime User Jul 13, 2017 #1 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: Jul 13, 2017
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.
Erel B4X founder Staff member Licensed User Longtime User Jul 13, 2017 #2 Trim the text when you add it: Code: Copy CS.Append(Text.Trim) Upvote 0
peacemaker Expert Licensed User Longtime User Jul 13, 2017 #3 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
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
DonManfred Expert Licensed User Longtime User Jul 13, 2017 #4 you can trim the line in the loop! Upvote 0
peacemaker Expert Licensed User Longtime User Jul 13, 2017 #5 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
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.
DonManfred Expert Licensed User Longtime User Jul 13, 2017 #6 You are ADDING the text to the CSBuilder, right? Why are you unable to trim the text? Upvote 0
peacemaker Expert Licensed User Longtime User Jul 13, 2017 #7 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
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.
Erel B4X founder Staff member Licensed User Longtime User Jul 13, 2017 #8 It is not possible to remove text after it was added to CSBuilder. Upvote 0
udg Expert Licensed User Longtime User Jul 13, 2017 #9 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
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.