Topic Path: Symbol Reference > Classes > TIdEncoder Class > TIdEncoder Methods > Encode Method > Encode Method (string)
TIdEncoder.Encode Method (string)

Provides encoding for String input values.

function Encode(
    const ASrc: string
): string; overload;
String value to be encoded. 

string - Encoded value for the input parameter(s).

Encode is an overloaded String function in TIdEncoder that allows String input values in ASrc to be encoded. 

ASrc contains the un-encoded values to be encoded in the method. 

Encode creates a TIdMemoryStream object instance used store the values in ASrc by calling WriteStringToStream. The stream is repositioned to its' origin prior to calling the overloaded Encode method using the TIdMemoryStream instance as an argument. 

The stream-based Encode method is an abstract virtual method, and must be implemented in a descendant class using the specific encoding algorithm for the implementation. 

Use the Decode method in TIdDecoder to decode values created using the Encode method.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.