ソースを参照

strlen is already in string.h

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.
main
FrankBoesing 10年前
コミット
7d3da62a48
1個のファイルの変更0行の追加8行の削除
  1. +0
    -8
      teensy3/nonstd.c

+ 0
- 8
teensy3/nonstd.c ファイルの表示

#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)
{ {

読み込み中…
キャンセル
保存