Monovski 4 Posted March 30, 2015 Report Share Posted March 30, 2015 Hello uboter, I have question: Example I have list, my list contain: Line 1Line 2Line 3Line 4Line 5Line 6Line 7Line 8 then I want to add text at the begining and at the end. result like this: newtext-line 1-endtextnewtext-line 2-endtextnewtext-line 3-endtextnewtext-line 4-endtextnewtext-line 5-endtextnewtext-line 6-endtextnewtext-line 7-endtextnewtext-line 8-endtext thanks so much for help, Quote Link to post Share on other sites
Bot-Factory 602 Posted March 30, 2015 Report Share Posted March 30, 2015 Loop through the list.Read the item from the old list.Add your stuffAdd the item to a new list.Delete first listDone RegardsDan Quote Link to post Share on other sites
Monovski 4 Posted March 30, 2015 Author Report Share Posted March 30, 2015 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 Quote Link to post Share on other sites
Monovski 4 Posted March 30, 2015 Author Report Share Posted March 30, 2015 I'll pm you Dan is it ok? Quote Link to post Share on other sites
Bot-Factory 602 Posted March 30, 2015 Report Share Posted March 30, 2015 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 Quote Link to post Share on other sites
pash 504 Posted March 30, 2015 Report Share Posted March 30, 2015 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") 2 Quote Link to post Share on other sites
Bot-Factory 602 Posted March 30, 2015 Report Share Posted March 30, 2015 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 I like it. 1 Quote Link to post Share on other sites
Monovski 4 Posted March 31, 2015 Author Report Share Posted March 31, 2015 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. Quote Link to post Share on other sites
Bot-Factory 602 Posted March 31, 2015 Report Share Posted March 31, 2015 And if you want to do that with very large lists, I highly recommend large data plugin. It's free and awesome!Dan Quote Link to post Share on other sites
sbm128 12 Posted April 17, 2016 Report Share Posted April 17, 2016 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.