Container - Extension: liblangtag Documentation

## Container - Extension Container - Extension — A container class for Extension subtag |

## Functions

lt_extension_t * | lt_extension_ref ()
void | lt_extension_unref ()
const char * | lt_extension_get_tag ()
char * | lt_extension_get_canonicalized_tag ()
void | lt_extension_dump ()
lt_bool_t | lt_extension_compare ()
lt_bool_t | lt_extension_truncate ()

## Types and Values

| lt_extension_t

## Description

This container class provides a data access to Extension subtag entry.

## Functions

### lt_extension_ref ()

    lt_extension_t *
    lt_extension_ref (lt_extension_t *extension);

Increases the reference count of `extension` .

#### Parameters

extension | a lt_extension_t. |

#### Returns

the same `extension` object.

[transfer none]

### lt_extension_unref ()

    void
    lt_extension_unref (lt_extension_t *extension);

Decreases the reference count of `extension` . when its reference count drops to 0, the object is finalized (i.e. its memory is freed).

#### Parameters

extension | a lt_extension_t. |

### lt_extension_get_tag ()

    const char *
    lt_extension_get_tag (lt_extension_t *extension);

Obtain the tag string.

#### Parameters

extension | a lt_extension_t. |

#### Returns

the tag string.

### lt_extension_get_canonicalized_tag ()

    char *
    lt_extension_get_canonicalized_tag (lt_extension_t *extension);

Generate a canonicalized tag.

#### Parameters

extension | a lt_extension_t. |

#### Returns

a string. this must be freed.

### lt_extension_dump ()

    void
    lt_extension_dump (lt_extension_t *extension);

Dumps the container information to the standard output.

#### Parameters

extension | a lt_extension_t. |

### lt_extension_compare ()

    lt_bool_t
    lt_extension_compare (const lt_extension_t *v1,
                          const lt_extension_t *v2);

Compare if `v1` and `v2` is the same object or not.

#### Parameters

v1 | a lt_extension_t. |
v2 | a lt_extension_t. |

#### Returns

`TRUE` if it's the same, otherwise `FALSE`.

### lt_extension_truncate ()

    lt_bool_t
    lt_extension_truncate (lt_extension_t *extension);

Truncate the last extension.

#### Parameters

extension | a lt_extension_t. |

#### Returns

`TRUE` if a subtag of the extension is truncated. otherwise `FALSE`.

## Types and Values

### lt_extension_t

    typedef struct _lt_extension_t lt_extension_t;

All the fields in the lt_extension_t structure are private to the lt_extension_t implementation.