Topic Path: Symbol Reference > Functions > DecodeString Function
DecodeString Function

Decodes the specified values using a decoder class reference.

function DecodeString(
    const aClass: TIdDecoderClass; 
    const aIn: string
): string;
Class reference to use when creating the decoder for the operation.
Encoded values for the operation. 

string - Un-encoded values from the operation.

DecodeString is a function used to decode values specified in AIn using an instance of the decoder class identified in AClass. DecodeString will raise an EAssertionFailed exception if the class reference in AClass has not been assigned (contains the value Nil). 

DecodeString creates an instance of the class reference in AClass for use in decoding the specified values. The return value for the function is derived by by calling the DecodeString method in the decoder class instance. The decoder class instance is freed prior to exiting from the procedure. 

Use the EncodeString function to perform encoding for values in a string data type using a specified encoder class.

Raised if the decoder class reference has not been assigned. 

Decoding string values using a class reference. 


  var sIn, sOut: String;
  sOut := DecodeString(TIdDecoder, sIn);
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.