What is the correct way to test for an empty string?

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Wed Jul 17 12:40:08 PDT 2013


On Wednesday, 17 July 2013 at 19:18:29 UTC, Rob T wrote:
> What was the rational for empty not being built in?
>
> Is there a performance penalty using "empty"?
>
> --rt

empty() was added to provide a range interface to arrays. 
Probably wasn't built in since you have to handle all array 
types. The concept of ranges make this clear, and since it didn't 
need to be built in to make it a range, it wasn't.


More information about the Digitalmars-d-learn mailing list