]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/string.c
a3d3c04956c8b91700334d533dce443ab0bb9d18
1 /* Implementations of the common string.h functions */
5 void *memcpy(void *dest
, const void *src
, int len
)
8 const uint8_t *s
= src
;
17 void *memset(void *dest
, int c
, int len
)
27 int memcmp(const void *av
, const void *bv
, int len
)
29 const uint8_t *a
= av
;
30 const uint8_t *b
= bv
;
42 int strlen(const char *str
)
52 char* strncat(char *dest
, const char *src
, unsigned int n
)
54 unsigned int dest_len
= strlen(dest
);
57 for (i
= 0 ; i
< n
&& src
[i
] != '\0' ; i
++)
58 dest
[dest_len
+ i
] = src
[i
];
59 dest
[dest_len
+ i
] = '\0';