Open topic with navigation

TIBCO Rendezvous® 8.7.0

# Add String

Convenience Function

## Declaration

    tibrv_status tibrvMsg_AddString(
       tibrvMsg       message,
       const char*    fieldName,
       const char*    value);
    tibrv_status tibrvMsg_AddStringEx(
       tibrvMsg       message,
       const char*    fieldName,
       const char*    value,
       tibrv_u16      fieldId);

## Purpose

Add a field containing a string.

## Remarks

The string cannot contain interior `NULL` bytes, because this function expects a `NULL`-terminated string. To add a string with interior `NULL` bytes, use the generic function tibrvMsg_AddField().

Parameter | Description
`message` | Add the new field to this message.
`fieldName` | Create the new field with this name.
`value` | Add a new field that contains this string (which may be a literal or stored in a variable). The function copies the data into the new field.
`fieldId` | Create the new 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. It is illegal to add a field that has both a `NULL` field name, and a non-zero field identifier.

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-2023. Cloud Software Group, Inc. All Rights Reserved.