27#ifndef __nvdialog_string_h__
28#define __nvdialog_string_h__ 1
38#define NVD_STRING(s) nvd_string_new(s)
45#define NVD_CSTR(s) nvd_string_to_cstr(s)
#define NVD_API
Definition nvdialog.h:113
struct _NvdDynamicString NvdDynamicString
A string type that can be resized, manipulated, converted and read from.
Definition nvdialog_string.h:60
NVD_API void nvd_string_clear(NvdDynamicString *string)
Clears the contents of the given NvdDynamicString.
NVD_API void nvd_string_reserve(NvdDynamicString *string, size_t bytes)
Preallocates memory for at least bytes inside the string 's data. No data will be lost.
NVD_API NvdDynamicString * nvd_duplicate_string(NvdDynamicString *other)
Duplicates the given NvdDynamicString without modifying it.
NVD_API NvdDynamicString * nvd_string_new(const char *data)
Creates a new NvdDynamicString and returns it, optionally with the data given in contents.
NVD_API void nvd_string_set_data(NvdDynamicString *string, const char *data)
Sets the actual string inside the given NvdDynamicString.
NVD_API size_t nvd_strlen(NvdDynamicString *string)
Returns the length of the given NvdDynamicString.
NVD_API void nvd_append_to_string(NvdDynamicString *string, NvdDynamicString *new_data)
Appends the contents of new_data to the end of string.
NVD_API void nvd_delete_string(NvdDynamicString *string)
Deletes the string from memory and casts it invalid to use.
NVD_API const char * nvd_string_to_cstr(NvdDynamicString *string)
Returns a const char* representation of the given NvdDynamicString.