or, alternativly one could write size_t strlen(const char *s) {return __builtin_strlen(s);} to use the gcc-builtin function.
I think, both are faster than the bytewise search.
teensy4-core
| #include <string.h> | #include <string.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| size_t strlen(const char *s) | |||||
| { | |||||
| size_t n=0; | |||||
| while (*s++) n++; | |||||
| return n; | |||||
| } | |||||
| char * ultoa(unsigned long val, char *buf, int radix) | char * ultoa(unsigned long val, char *buf, int radix) | ||||
| { | { |