summaryrefslogtreecommitdiff
path: root/js/str.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/str.js')
-rw-r--r--js/str.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/str.js b/js/str.js
index b7d9d28..31621bf 100644
--- a/js/str.js
+++ b/js/str.js
@@ -1,5 +1,7 @@
-
-
+/*
+ * currently unused (iirc) garbage
+ * basically just prints an address than the uint32_t there, and then +4, etc
+ */
function prim_dump_u32(buf) {
s = "";
@@ -29,6 +31,9 @@ function prim_dump_u32(buf) {
return s;
}
+/*
+ * pad str to n chars with c chars to the left
+*/
function pad_left(s, c, n) {
s_ = s;
@@ -39,6 +44,9 @@ function pad_left(s, c, n) {
return s_;
}
+/*
+ * convert ASCII str to uint8array (unicode be damned)
+ */
function str_to_uint8_buf(s) {
buf = new Uint8Array(s.length);