Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
341 B

  1. #include "str.h"
  2. #ifdef __dietlibc__
  3. #undef str_len
  4. unsigned long str_len(const char* in) __attribute__((alias("strlen")));
  5. #else
  6. unsigned long str_len(const char* in) {
  7. register const char* t=in;
  8. for (;;) {
  9. if (!*t) break; ++t;
  10. if (!*t) break; ++t;
  11. if (!*t) break; ++t;
  12. if (!*t) break; ++t;
  13. }
  14. return t-in;
  15. }
  16. #endif