RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIniFile.ReadString Method

Retrieves a string value from an INI file.

Pascal
function ReadString(const Section: string; const Ident: string; const Default: string): string; override;
C++
virtual __fastcall AnsiString ReadString(const AnsiString Section, const AnsiString Ident, const AnsiString Default);

Call ReadString to read a string value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the string value to return if the: 

Section does not exist. 

Key does not exist. 

Data value for the key is not assigned. 

This version of ReadString is only available if the application is compiled for Windows. On Linux, ReadString is inherited from TMemIniFile

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!