System.SysUtils.BytesOf

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function BytesOf(const Val: RawByteString): TBytes;
function BytesOf(const Val: WideChar): TBytes;
function BytesOf(const Val: AnsiChar): TBytes; overload;
function BytesOf(const Val: UnicodeString): TBytes;
function BytesOf(const Val: Pointer; const Len: Integer): TBytes;

C++

extern DELPHI_PACKAGE System::DynamicArray<System::Byte> __fastcall BytesOf(const System::RawByteString Val)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Converts a string into a byte array.

Call BytesOf to convert a string or a character into an array of bytes. Unicode strings and WideStrings are converted using the default system locale represented by the Default property of the TEncoding class.

See Also

Code Examples