Jump to content
UBot Underground

Add Text To The List


Recommended Posts

Hello uboter,

 

I have question:

 

Example I have list, my list contain:

 

Line 1

Line 2

Line 3

Line 4

Line 5

Line 6

Line 7

Line 8

 

then I want to add text at the begining and at the end. result like this:

 

newtext-line 1-endtext

newtext-line 2-endtext

newtext-line 3-endtext

newtext-line 4-endtext

newtext-line 5-endtext

newtext-line 6-endtext

newtext-line 7-endtext

newtext-line 8-endtext

 

thanks so much for help,

Link to post
Share on other sites

Hi Dan

 

thanks for reply

 

any other methods for more faster? Because list to be add text can be more than 200 line sometime 300

 

thanks

 

For a list with just 300 entries you don't have to think about speed.

If your list has 5 million rows, we can talk again :-)

 

Dan

Link to post
Share on other sites

Try.

clear list(%list1)
clear list(%list2)
add list to list(%list1,$list from text("Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8",$new line),"Delete","Global")
set(#list1,"newtext-{$replace(%list1,$new line,"-endtext{$new line}newtext-")}-endtext","Global")
add list to list(%list2,$list from text(#list1,$new line),"Delete","Global")
  • Like 2
Link to post
Share on other sites

 

Try.

clear list(%list1)
clear list(%list2)
add list to list(%list1,$list from text("Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8",$new line),"Delete","Global")
set(#list1,"newtext-{$replace(%list1,$new line,"-endtext{$new line}newtext-")}-endtext","Global")
add list to list(%list2,$list from text(#list1,$new line),"Delete","Global")

Nice one Pash. That's an inovative way :D  I like it.

  • Like 1
Link to post
Share on other sites

hi,

 

thanks for Dan pash,

 

I try both sugestion and it's working good but I more prefer using sugestion from Dan. I try 500 loops with no problem.

Link to post
Share on other sites
  • 1 year later...

 

Try.

clear list(%list1)
clear list(%list2)
add list to list(%list1,$list from text("Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8",$new line),"Delete","Global")
set(#list1,"newtext-{$replace(%list1,$new line,"-endtext{$new line}newtext-")}-endtext","Global")
add list to list(%list2,$list from text(#list1,$new line),"Delete","Global")

I don't know how you came up with this little guy, love it tho.  Dan's works great too oc, but +1 for originality and +2 for giving me a headache lol

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...