class equal (ap, bp)
class find (init)
class hash (p)
class new (init)
class system_init ()
class system_shutdown ()
  get ()
  get_folded ()
  get_sort_key ()
  ref ()
  unref ()


class RB.RefString
classmethod equal(ap, bp)

True if the strings are the same

Return type:


Key equality function suitable for use with GLib.HashTable. Equality checks for RB.RefString are just pointer comparisons, since there can only be one refstring for a given string.

classmethod find(init)
Parameters:init (str) – string to find
Returns:existing RB.RefString, or None
Return type:RB.RefString

Returns an existing RB.RefString for init if one exists, otherwise returns None. If an existing refstring is found, its reference count is increased.

classmethod hash(p)
Parameters:p (object or None) – an RB.RefString
Returns:hash value for the string underlying p
Return type:int

Hash function suitable for use with GHashTable.

classmethod new(init)
Parameters:init (str) – string to intern
Returns:RB.RefString for init
Return type:RB.RefString

Returns an RB.RefString for the specified string. If one already exists, its reference count is incremented and it is returned. Otherwise, a new RB.RefString is created and returned.

classmethod system_init()

Sets up the refstring system. Called on startup.

classmethod system_shutdown()

Frees all data associated with the refstring system. Only called on shutdown.

Returns:underlying string, must not be freed
Return type:str

Returns the actual string for a RB.RefString.

Returns:case-folded string, must not be freed
Return type:str

Returns the case-folded version of the string underlying self. The case-folded string is cached inside the RB.RefString for speed. See rb_search_fold for information on case-folding strings.

Returns:sort key string, must not be freed.
Return type:str

Returns the sort key version of the string underlying self. The sort key string is cached inside the RB.RefString 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.

Returns:the same refstring
Return type:RB.RefString

Increases the reference count for an existing RB.RefString. The refstring is returned for convenience.


Drops a reference to an RB.RefString. If this is the last reference, the string will be freed.