Added system fetcher and strcpy(string.h)
This commit is contained in:
@@ -88,6 +88,13 @@ size_t strlen(const uint8_t *buf) {
|
||||
return i;
|
||||
}
|
||||
|
||||
uint8_t *strcpy(uint8_t *dst, const uint8_t *src) {
|
||||
uint8_t *dst_p = dst;
|
||||
while((*dst++ = *src++));
|
||||
|
||||
return dst_p;
|
||||
}
|
||||
|
||||
/* Worst memset implementation
|
||||
* i could find on the net.
|
||||
* however it works so... */
|
||||
@@ -122,4 +129,4 @@ void strlower(uint8_t *str) {
|
||||
if(str[i] == 'A' && str[i] < 'Z')
|
||||
str[i] |= 0x60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user