Ruminate
Type introspection for C
 All Classes Files Functions Enumerations Enumerator Macros Pages
RString Struct Reference

An opaque struct representing a string. More...

Public Member Functions

RStringr_string_ref (RString *string)
 Increase the reference count on this RString. More...
 
void r_string_unref (RString *string)
 Decrease the reference count on this RString. More...
 
const char * r_string_bytes (RString *string)
 Get the C-style string (array of characters) backing this RString. More...
 
size_t r_string_length (RString *string)
 Get the length of this RString. More...
 

Detailed Description

An opaque struct representing a string.

An RString is a reference counted array of characters.

Member Function Documentation

const char * r_string_bytes ( RString string)

Get the C-style string (array of characters) backing this RString.

The behavior is undefined if this array is modified.

Returns
the array of characters backing this RString
Parameters
[in]stringthe string to get the array of characters of
size_t r_string_length ( RString string)

Get the length of this RString.

Returns
the length of this RString
Parameters
[in]stringthe string to get the length of
RString * r_string_ref ( RString string)

Increase the reference count on this RString.

Returns
string
Parameters
[in]stringthe string to increase the reference count of
void r_string_unref ( RString string)

Decrease the reference count on this RString.

If the reference count of this RString drops to zero, the string will be freed.

Parameters
[in]stringthe string to decrease the reference count of

The documentation for this struct was generated from the following file: