A small library that's provide helpers for programmers
MyLibc.cpp
- Committer:
- clemounet
- Date:
- 2015-02-17
- Revision:
- 1:ee7a5f05513d
File content as of revision 1:ee7a5f05513d:
#include "MyLibc.h" #include "mbed.h" char *strdup(const char *str) { uint32_t len; char *copy; len = strlen(str) + 1; if (!(copy = (char*)malloc(len))) return 0; strncpy(copy,str,len); return copy; }