Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias movetok {
- ; $movetok(text,string,N,C)
- if ($1 == $null) || ($2 == $null) || ($3 == $null) || ($4 == $null) { return }
- var %f = $findtok($1,$2,1,$4)
- if (!%f) || ($3 !isnum) || ($3 < 1) || ($4 !isnum) { return }
- if (%f > $3) { var %n = $instok($1,$2,$3,$4) | var %r = $deltok(%n,$calc(%f + 1),$4) }
- else { var %n = $instok($1,$2,$calc($3 + 1),$4) | var %r = $deltok(%n,%f,$4) }
- return %r
- }
- alias movetokcs {
- ; $movetokcs(text,string,N,C)
- if ($1 == $null) || ($2 == $null) || ($3 == $null) || ($4 == $null) { return }
- var %f = $findtokcs($1,$2,1,$4)
- if (!%f) || ($3 !isnum) || ($3 < 1) || ($4 !isnum) { return }
- if (%f > $3) { var %n = $instok($1,$2,$3,$4) | var %r = $deltok(%n,$calc(%f + 1),$4) }
- else { var %n = $instok($1,$2,$calc($3 + 1),$4) | var %r = $deltok(%n,%f,$4) }
- return %r
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement