Converts the data type to a TIdBytes value.
function ToBytes( const AValue: string; const AEncoding: TIdEncoding = enANSI ): TIdBytes; overload;
ToBytes is an overloaded TIdBytes function used to convert the data type in AValue to the return value for the function.
ToBytes is a utility function used internally in the Indy library, and isolates the platform-specific requirements for working with Delphi string and .Net array of Byte data types.
For the .Net platform, the AnsiEncoding.GetBytes method from the framework is used to store the converted values.
For all other platforms, the Move procedure from the runtime library is used to store the converted values.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.