Parcourir la source

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.
teensy4-core
FrankBoesing il y a 10 ans
Parent
révision
7d3da62a48
1 fichiers modifiés avec 0 ajouts et 8 suppressions
  1. +0
    -8
      teensy3/nonstd.c

+ 0
- 8
teensy3/nonstd.c Voir le fichier

@@ -32,14 +32,6 @@
#include <string.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)
{

Chargement…
Annuler
Enregistrer