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 glib.StringChunk

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

clear
void clear()

Frees all strings contained within the glib.StringChunk After calling StringChunk.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 glib.StringChunk After calling StringChunk.free it is not safe to access any of the strings which were contained within it.

getStringChunkStruct
GStringChunk* getStringChunkStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

insert
string insert(string string_)

Adds a copy of string to the glib.StringChunk It returns a pointer to the new copy of the string in the glib.StringChunk 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 string_)

Adds a copy of string to the glib.StringChunk, unless the same string has already been added to the glib.StringChunk with StringChunk.insertConst.

insertLen
string insertLen(string string_, ptrdiff_t len)

Adds a copy of the first len bytes of string to the glib.StringChunk The copy is nul-terminated.

Variables

gStringChunk
GStringChunk* gStringChunk;

the main Gtk struct