File Content Extraction 25.2
Filter SDK C++ Programming Guide

# convert_to_string

The value of this metadata item, converted into a string form using a pre-defined set of formats.

This method applies the same transformations during the conversion to string as the metadata_map method.

- Boolean values are represented as either 'true' or 'false'.
- Date-time values are represented as an integer number of epoch seconds (the number of seconds since the beginning of January 1st, 1970).
- Binary values are represented by treating them as strings - interpreting each individual byte as if it were a character in the computer's single-byte code page.

- MIPLabel values are printed as `[LabelID="<label.labelId>", Enabled=<label.enabled>, SiteId="<label.siteId>", ActionId="<label.actionId>", Method="<label.method>", SetDate=<label.setDate>, Name="<label.name>", ContentBits=<label.contentBits>]`.

  Optional MIPLabel member data are presented in the converted string only if they are non-null. For example, if the pointer `label.setDate` is empty, the entire segment `SetDate=value` is absent from the output.

  Non-string members are presented in the same format as they would be as standalone values - the boolean `Enabled` is presented as 'true' or 'false', the date-time `SetDate` is presented in epoch seconds.

## Syntax

    std::string convert_to_string() const;

## Discussion

The `MetadataElement` class also provides a conversion operator to `std::string`. This allows you to use `MetadataElement` instances when `std::string` values are expected, without needing to call `convert_to_string()`. The resulting string is identical to the one produced by calling `convert_to_string()`.

Copyright 1997-2025 Open Text
Version 25.2 | Last updated April 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 25.2

Topic Title: convert_to_string