Encodes the specified values using an encoder class reference.
function EncodeString( const aClass: TIdEncoderClass; const aIn: string ): string;
Parameters |
Description |
aClass |
Class reference to use when creating the encoder for the operation. |
aIn |
Un-encoded values for the operation. |
string - Encoded values from the operation.
EncodeString is a function used to encode values specified in AIn using an instance of the encoder class identified in AClass. EncodeString will raise an EAssertionFailed exception if the class reference in AClass has not been assigned (contains the value Nil).
EncodeString creates an instance of the class reference in AClass for use in encoding the specified values. The return value for the function is derived by by calling the ENcode method in the encoder class instance. The encoder class instance is freed prior to exiting from the routine.
Use the DecodeString function to perform decoding for values in a string data type using a specified decoder class.
Exceptions |
Description |
EAssertionFailed |
Raised if the decoder class reference has not been assigned. |
Encoding string values using a class reference.
[Delphi]
var sIn, sOut: String; sOut := EncodeString(TIdEncoder, sIn);
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
|
Post feedback to the Indy Docs Newsgroup.
|