System.StrUtils.IfThen
Delphi
function IfThen(AValue: Boolean; const ATrue: string;
AFalse: string = ''): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall IfThen(bool AValue, const System::UnicodeString ATrue, System::UnicodeString AFalse = System::UnicodeString())/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.StrUtils.pas System.StrUtils.hpp |
System.StrUtils | System.StrUtils |
Description
Conditionally returns one of two specified values.
IfThen checks the expression passed as AValue and returns ATrue if it evaluates to true, or AFalse if it evaluates to false. In Delphi, if the AFalse parameter is omitted, IfThen returns 0 or an empty string when AValue evaluates to False.