sl_find_n_tag

Purpose

Retrieves the label of the nth tag string from a buffer of collected tag strings.

Library

The signaling interface library (libsl.a).

C syntax

#include <sltag.h>
...
SL_RET_CODE       sl_find_n_tag (
    char *        buffer,
    int           n,
    char *        destination,
    int           destination_len
);

Description

Searches buffer for the nth tag string. If found, the tag label is copied to destination (sl_get_tag can then be called to retrieve the whole tag string).

Parameters

buffer
A string containing one or more tag strings.
n
An integer, used as an index for buffer (for example, n=2 identifies the second tag string in buffer.
destination
A string variable to which the tag label is copied.
destination_len
The total length of destination (the string capacity in bytes).

Return values

SLRC_OK
Successful.
SLRC_NOT_FOUND
Could not find an nthtag. buffer is unchanged.
SLRC_OVERFLOW
Insufficient space in destination to store the string label
SLRC_INVALID_TAG
The tag string containing tag is syntactically incorrect, tag value was not changed.
SLRC_NULL_PTR
buffer or destination is a null pointer.

Related information