summaryrefslogtreecommitdiff
path: root/src/user/knob/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/knob/block.c')
-rw-r--r--src/user/knob/block.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/user/knob/block.c b/src/user/knob/block.c
index 7524ad3..4ec0564 100644
--- a/src/user/knob/block.c
+++ b/src/user/knob/block.c
@@ -14,4 +14,13 @@ bool blockequ(const void *a, const void *b, uint32_t size) {
if (*(uint8_t *)(a++) != *(uint8_t *)(b++))
return false;
return true;
+}
+
+//returns length without null-terminator
+uint32_t strcpy(char *to, const char *from) {
+ uint32_t i = 0;
+ do
+ to[i] = from[i];
+ while (from[i++]);
+ return i - 1;
} \ No newline at end of file