diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 10:32:47 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 10:32:47 +0100 |
commit | 47cebef7a2e4dd66be9f7f6b0b8e8cadfeb6064a (patch) | |
tree | 7759b32e416db4cd6e0e73cd06261a28edafa992 /strings.c | |
parent | 28bbb56f349721bf8d2b7221427e925a3960f8da (diff) | |
download | rpi-MMU-example-47cebef7a2e4dd66be9f7f6b0b8e8cadfeb6064a.tar.gz rpi-MMU-example-47cebef7a2e4dd66be9f7f6b0b8e8cadfeb6064a.zip |
add strlen implementation
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -71,3 +71,11 @@ void uint32_to_hexstringt(uint32_t number, char buf[9]) trim_0s(buf); } +size_t strlen(char string[]) +{ + size_t len; + + for (len = 0; string[len]; len++); + + return len; +} |