Open topic with navigation

TIBCO Rendezvous® 8.8.0

# Get String

Convenience Function

## Declaration

    tibrv_status tibrvMsg_GetString(
       tibrvMsg       message,
       const char*    fieldName,
       const char**   value);
    tibrv_status tibrvMsg_GetStringEx(
       tibrvMsg       message,
       const char*    fieldName,
       const char**   value,
       tibrv_u16      fieldId);

## Purpose

Get the value of a field as a character string.

## Remarks

This convenience function retrieves a field and extracts its data, automatically converting it to a string.

Programs can use this function to obtain a printable representation of field data. For most datatypes, this function formats the full value of the field to the output string; however, these two types are exceptions:

TIBRVMSG_OPAQUE | This function abbreviates the value of an opaque field; for example, `[472 opaque bytes]`.
TIBRVMSG_XML | This function abbreviates the value of an XML field; for example, `[XML document: 472 bytes]`. The size measures uncompressed data.

Pointer data extracted from the field remain valid until the message is destroyed; that is, even removing the field or updating the field’s value does not invalidate pointer data.

This function produces values that are read-only snapshots of the field data (see Pointer Snapshot). Programs must not modify the value string.

Parameter | Description
`message` | Get the specified field of this message.
`fieldName` | Get a field with this name.
`value` | The program supplies a location in this parameter, and the function stores a pointer to the field value in that location.
`fieldId` | Get the field with this identifier. Zero is a special value that signifies no field identifier. All non-zero field identifiers must be unique within each message.

## See Also

Validity of Data Extracted From Messages

Field Names and Field Identifiers

Datatype Conversion

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.