Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move the position of the multiline string
#6
If there are empty lines between functions, it also affects the result

Only move the main function body to the bottom, and do not change the other line content

Macro M2
Code:
Copy      Help
_s=
;function Main([string[]]$args)
;{
;,function D($p1)
;,{
;,,'{D}'
;,}
;}
;function A($p1, $p2)
;{
;,'{A}'
;}
;
;function B($p1)
;{
;,'{B}'
;}
;function C()
;{
;,'{C}'
;}

;Todo:  Move the position of the multiline string (function Main)
str s1 s2
foreach s1 _s
,s2.addline(s1 -1)
,if(!s1.len) break
_s.remove(0 s2.len)
s2- "[]"; s2.rtrim
_s.addline(s2 -1)
out _s


Messages In This Thread
RE: Move the position of the multiline string - by Davider - 10-23-2022, 12:57 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)