StringChunk

An opaque data structure representing String Chunks. It should only be accessed by using the following functions.

Constructors

this
this(GStringChunk* gStringChunk, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(size_t size)

Creates a new #GStringChunk.

Members

Functions

clear
void clear()

Frees all strings contained within the #GStringChunk. After calling g_string_chunk_clear() it is not safe to access any of the strings which were contained within it.

free
void free()

Frees all memory allocated by the #GStringChunk. After calling g_string_chunk_free() it is not safe to access any of the strings which were contained within it.

getStringChunkStruct
GStringChunk* getStringChunkStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

insert
string insert(string str)

Adds a copy of @string to the #GStringChunk. It returns a pointer to the new copy of the string in the #GStringChunk. The characters in the string can be changed, if necessary, though you should not change anything after the end of the string.

insertConst
string insertConst(string str)

Adds a copy of @string to the #GStringChunk, unless the same string has already been added to the #GStringChunk with g_string_chunk_insert_const().

insertLen
string insertLen(string str, ptrdiff_t len)

Adds a copy of the first @len bytes of @string to the #GStringChunk. The copy is nul-terminated.

Variables

gStringChunk
GStringChunk* gStringChunk;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta