Checking if a string is null

Ald aldarri_s at yahoo.com
Wed Jul 25 05:43:15 PDT 2007


I believe the manual says that, when comparing, the compiler tries to call the opEquals() method.  And calling that from null pointer yields undefined behavior.  You should use _!is null_ construct instead.

Max Samukha Wrote:



More information about the Digitalmars-d-learn mailing list