company logo

Binary :: toString - Convert binary data to string

The function converts binary data to a string. When binary data contains non-character types, string data may become incorrect, i.e. before calling the function one should ensure, that it really contains string data for the requested encoding type.

Return value:  String value ( odaba::String & )

Implementation overview

Implementation details

  1. Convert part of binary data to string
    odaba::String Binary  :: toString ( odaba::StringCodingTypes eStringCodingType, int32 iCount )

    The function converts binary data copying iCount bytes to string data. Character encoding is set to encoding type passed in eStringEncoding. When the area is preceded by a valid BOM, string encoding type defined in the BOM is used and string will be converted into the requested coding type passed in eStringEncoding.

    • eStringCodingType - String encoding type

      In case of unknown text encoding type undefinedCoding is used.

    • iCount - Number of items

      The value contains the number of items to be processed or stored in a collection.

  2. to list
  3. Convert part of binary data to string
    odaba::String Binary  :: toString ( int32 iCount )

    The function converts data from position passed in iPosition copying iCount bytes to string data. When the buffer is preceded by a BOM, encoding type is evaluated from BOM and the string will be converted to default encoding.

    • iCount - Number of items

      The value contains the number of items to be processed or stored in a collection.

  4. to list