Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move the position of the multiline string
#7
that code doesn't work at all. does not move code to the bottom

try this 1
 
Code:
Copy      Help
str ss s; int iii i ii lines ec sline
foreach s _s
,if(s.beg("function Main")) 
,,sline=i
,,ec=1
,,ii+1
,if(ii=1)
,,if(ec =0) break
,,ss.addline(s -1)
,,lines+1        
,,if(findc(s '{')<>-1)
,,,iii+1
,,if(findc(s '}')<>-1)
,,,iii-1
,,,if iii=0
,,,,ec=0
,i+1
_s.RemoveLineN(sline lines)
ss- "[]"; ss.rtrim
_s.addline(ss -1)
_s.replacerx("(?:(?:(?!\n)\s)*\n){2,}" "[][]");;replace multiple blank lines to 1
out _s


Messages In This Thread
RE: Move the position of the multiline string - by Kevin - 10-23-2022, 01:08 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)