ByteArray2String - Make a string from an array of byte values

Top 

Syntax

<cString> := ByteArray2String( <aByteValueArray> )

Parameters

<aByteValueArray>

 

An array of numeric values in the BYTE range.

Return value

A string consisting of the characters specified in <aByteValueArray>.

Description

ByteArray2String creates a string containing the characters specified in <aByteValueArray>. For every value in <aByteValueArray> the corresponding character is created and added to the return string.

Classification

Core

Category

Array and string utility

Quick Info

Library: cckptcor.lib / cckptcor.dll

See also

Array2String

Example

 

#INCLUDE "CockpitCoreLibs.ch"

 

FUNCTION Main

 

LOCAL string

 

* Create a string with the characters 0x01, 0x02, 0x03

string := ByteArray2String({0x01,0x02,0x03})

 

* Output the result

? HexString(string)

 

RETURN NIL