mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-12 10:40:53 +01:00
17 lines
329 B
C++
17 lines
329 B
C++
|
|
#define ZPL_IMPLEMENTATION
|
||
|
|
#define ZPL_NANO
|
||
|
|
#include <zpl.h>
|
||
|
|
|
||
|
|
int main()
|
||
|
|
{
|
||
|
|
char const* foo = "hello world";
|
||
|
|
|
||
|
|
//NOTE: length of a string + 1 extra byte for null terminator.
|
||
|
|
isize len = strlen(foo) + 1;
|
||
|
|
|
||
|
|
char *bar = zpl_strdup(zpl_heap(), (char *)foo, len);
|
||
|
|
zpl_printf("%s == %s\n", foo, bar);
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
|