
#ifndef CString_DEFINED 
#define CString_DEFINED 1

#include <stdlib.h>
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
IOINLINE char *CString_newWithSize_(size_t size)
{
    char *self = (char *)malloc(size);
    
    if (size) 
    {
	self[0] = 0x0; // NULL terminate it 
    }
    
    return self;
}

IOINLINE char *CString_free(char *self)
{
    free(self);
    return 0x0;
}

IOINLINE char *CString_copy_(char *self, const char *other)
{
    return strcpy((char *)realloc(self, strlen(other) + 1), other);
}
*/

#define CString_copy_(self, other) strcpy((char *)realloc(self, strlen(other) + 1), other)

#ifdef __cplusplus
}
#endif
#endif


