summaryrefslogtreecommitdiff
path: root/tnslc/vector.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/vector.tnsl')
-rw-r--r--tnslc/vector.tnsl7
1 files changed, 7 insertions, 0 deletions
diff --git a/tnslc/vector.tnsl b/tnslc/vector.tnsl
index 87a49e9..73580e0 100644
--- a/tnslc/vector.tnsl
+++ b/tnslc/vector.tnsl
@@ -71,6 +71,13 @@ struct Vector {
;/
;/
+ # [UNSAFE] ONLY USE FOR STRING VECTORS
+ /; add_str (~uint8 dat)
+ /; loop (int i = 0; dat{i} !== 0)
+ self.push(dat + i)
+ ;/
+ ;/
+
/; start (int el_size)
self.num_el = 0
self.el_size = el_size