diff --git a/std/string/array/swap.lb b/std/string/array/swap.lb new file mode 100644 index 0000000..583625f --- /dev/null +++ b/std/string/array/swap.lb @@ -0,0 +1,21 @@ +@ 0 ; Get both arguments + args 0 + size + #exec std/string/array/rev.lb + + args 1 + dup + ; |str_size str_size...> + +@ 1 + + kjz 2 + #expr - + args 1 + #exec std/rot.lb + #exec std/rot.lb + jmp 1 + +@ 2 + pop + #exec std/string/array/rev.lb