BytesOf

Return the bytes in a string

Declaration

Source position: sysansih.inc line 24

  function BytesOf(const Val: RawByteString) : TBytes;
  function BytesOf(const Val: AnsiChar) : TBytes;
  function BytesOf(const Val: UnicodeString) : TBytes;  Overload;
  function BytesOf(const Val: WideChar) : TBytes;  Overload;

Description

BytesOf returns a copy of the string's content as an array of bytes. For an empty string, zero bytes are returned (i.e. length(BytesOf(S))=0).

See also

Name Description
TBytes Array of byte