Struct
RBRefString
Constructors
rb_refstring_new
Returns an RBRefString
for the specified string.
If one already exists, its reference count is incremented and it is
returned. Otherwise, a new RBRefString
is created and returned.
Functions
rb_refstring_equal
Key equality function suitable for use with GHashTable
.
Equality checks for RBRefString
are just pointer comparisons,
since there can only be one refstring for a given string.
rb_refstring_find
Returns an existing RBRefString
for init
if one exists,
otherwise returns NULL. If an existing refstring is found,
its reference count is increased.
rb_refstring_system_shutdown
Frees all data associated with the refstring system. Only called on shutdown.
Instance methods
rb_refstring_get_folded
Returns the case-folded version of the string underlying val
.
The case-folded string is cached inside the RBRefString
for
speed. See rb_search_fold
for information on case-folding strings.
rb_refstring_get_sort_key
Returns the sort key version of the string underlying val
.
The sort key string is cached inside the RBRefString
for speed.
Sort key strings are not generally human readable, so don’t display
them anywhere. See g_utf8_collate_key_for_filename
for information
on sort keys.
rb_refstring_ref
Increases the reference count for an existing RBRefString
.
The refstring is returned for convenience.
rb_refstring_unref
Drops a reference to an RBRefString
. If this is the last
reference, the string will be freed.