aboutsummaryrefslogtreecommitdiff
path: root/stdlib.rip
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib.rip')
-rw-r--r--stdlib.rip59
1 files changed, 59 insertions, 0 deletions
diff --git a/stdlib.rip b/stdlib.rip
new file mode 100644
index 0000000..8ab0448
--- /dev/null
+++ b/stdlib.rip
@@ -0,0 +1,59 @@
+0I[prints string; destructive]
+F<strprint>[
+ <strrev>
+ 97aDm
+ SDW[
+ D3RD3rM o D3rq
+ D]
+ PP
+]
+
+0I[takes string char; returns string+char]
+F<strpush>[
+ S97aDmma
+]
+
+0I[reverses string in place]
+F<strrev>[
+ 0S
+ DW[
+ D 97aDm D 3r M 3r q 3r S 97aDm m a S
+ D]
+ P
+]
+
+0I[concatenates two strings]
+F<strcat>[
+ <strrev> 97aDm S
+ DW[
+ S D 3r S D 3R M 4R 97aDmma 3r S D 3r q
+ D]
+ PP
+]
+
+0I[takes list of characters and a length, builds a string]
+F<mkstr>[
+ 0S
+ DW[
+ D3aR 3R 97aDm m a S d
+ D]
+ P
+]
+
+0I[
+ a b 256
+ a b 256 256
+ a 256 b 256
+ a 256 256 b
+ a 256 256 b b
+ a 256 b b 256
+ a 256 b b%ff
+ 256 b b%ff a
+ 256 b newa
+ newa 256 b
+ newa b 256
+ newa b 256 256
+ newa 256 b 256
+ newa 256 newb
+ newa newb 256
+]