function BoolToStr(const B: Boolean): Substring; overload; inline;
'-1' for True, '0' for False.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | B | Boolean |
Returns: Substring
Remarks:
Call it qualified: Substr.BoolToStr(b).
Examples
Both values.
uses Substr, System.SysUtils;
procedure Example;
begin
Assert(Substr.BoolToStr(True) = '-1');
Assert(Substr.BoolToStr(False) = '0');
end;