Check whether a range is empty
Gary Willoughby
dev at nomad.uk.net
Tue Jul 17 13:59:45 UTC 2018
On Friday, 13 July 2018 at 18:37:35 UTC, vino.B wrote:
> Hi All,
>
> How do i check whether a range is empty. eg.
> (!PFResutl.toRange).empty. I tired the below, but it is no
> printing Empty if the range is empty it just prints blank line.
>
> if (!(!PFResutl.toRange).empty) { writeln("Empty"); }
>
>
> From,
> Vino.B
I thought every range at the lowest level has an `empty`
property. So, in this case, it would be:
if (PFResutl.toRange.empty)
{
writeln("Empty");
}
More information about the Digitalmars-d-learn
mailing list