mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
9 lines
242 B
C++
9 lines
242 B
C++
#include "libmiqt.h"
|
|
|
|
struct miqt_string* miqt_strdup(const char* src, size_t len) {
|
|
struct miqt_string* ret = (struct miqt_string*)( malloc(len + sizeof(size_t)) );
|
|
ret->len = len;
|
|
memcpy(&ret->data, src, len);
|
|
return ret;
|
|
}
|