[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)


Return a string based on an array of bytes


Source position: sysencodingh.inc line 89

public function TEncoding.GetString(

  const Bytes: TBytes

):UnicodeString; overload;

function TEncoding.GetString(

  const Bytes: TBytes;

  ByteIndex: Integer;

  ByteCount: Integer

):UnicodeString; overload;


GetString will return a Unicode string, created from the bytes in the Bytes array. The bytes array will be interpreted according to the encoding which the TEncoding represents.

If ByteIndex and ByteCount are specified, only the ByteCount bytes starting at position ByteIndex will be converted.


In case of invalid bytes, an EEncodingError exception may be raised.

Documentation generated on: May 14 2021