Skip to content

IfThen

Returns one of two strings, depending on a boolean expression.

Declaration

Source position: strutils.pp line 92

function IfThen(AValue: Boolean; const ATrue: string; 
               const AFalse: string='') : string;  overload; overload;
function IfThen(AValue: Boolean; const ATrue: TStringDynArray; 
               const AFalse: TStringDynArray=Nil) : TStringDynArray
               ;  overload; overload;

Description

IfThen returns ATrue if AValue is True, and returns AFalse if AValue is false.

Errors

None.

See also

Name Description
AnsiMatchStr Check whether a string occurs in an array of strings, observing case.
AnsiMatchText Check whether a string occurs in an array of strings, disregarding case.