SeedString

SeedString — Manipulation of SeedString objects.

Synopsis


#include <seed/seed.h>

typedef             SeedString;
SeedString          seed_string_ref                     (SeedString string);
void                seed_string_unref                   (SeedString string);
gsize               seed_string_get_maximum_size        (SeedString string);
gsize               seed_string_to_utf8_buffer          (SeedString string,
                                                         gchar *buffer,
                                                         size_t buffer_size);
gboolean            seed_string_is_equal                (SeedString a,
                                                         SeedString b);
gboolean            seed_string_is_equal_utf8           (SeedString a,
                                                         const gchar *b);

Description

Details

SeedString

typedef gpointer SeedString;


seed_string_ref ()

SeedString          seed_string_ref                     (SeedString string);

Increments the reference count of string.

string :

A SeedString.

Returns :

string

seed_string_unref ()

void                seed_string_unref                   (SeedString string);

Decrements the reference count of string.

string :

A SeedString.

seed_string_get_maximum_size ()

gsize               seed_string_get_maximum_size        (SeedString string);

string :

A SeedString.

Returns :

The maximum number of bytes string will take up if converted to a null-terminated UTF8 string.

seed_string_to_utf8_buffer ()

gsize               seed_string_to_utf8_buffer          (SeedString string,
                                                         gchar *buffer,
                                                         size_t buffer_size);

string :

A SeedString.

buffer :

An allocated string.

buffer_size :

The length of buffer, in bytes.

Returns :

A the number of bytes copied into buffer.

seed_string_is_equal ()

gboolean            seed_string_is_equal                (SeedString a,
                                                         SeedString b);

a :

The first SeedString to compare.

b :

The second SeedString to compare.

Returns :

true, if a and b are equal, false otherwise.

seed_string_is_equal_utf8 ()

gboolean            seed_string_is_equal_utf8           (SeedString a,
                                                         const gchar *b);

Tests the equality of a SeedString and a UTF-8 C-style string.

a :

The SeedString to compare.

b :

A gchar* to compare to.

Returns :

true, if a and b are equal, false otherwise.