/** * Contains the definition of the String structure, which is a simple representation of a string in C. */ #ifndef STR_H #define STR_H #include /** * A simple string structure that holds a pointer to the character data and its length. */ typedef struct { char* data; size_t length; } String; /** * Creates a copy of a string. * * Note that this copy has to be freed afterwards. * * @param string The string to copy. * @returns A null-terminated copy of the string. */ char* string_copy(String string); #endif