On Thursday, 12 October 2017 at 18:17:54 UTC, Adam D. Ruppe wrote:
On Thursday, 12 October 2017 at 18:11:55 UTC, Nieto wrote:
Does D have an equivalent to C#'s String.IsNullOrWhiteSpace() in the standard library?

import std.string;

if(str.strip().length == 0) {
  // is null, empty, or all whitespace
}

Or this:
if(!str.strip()) {
  // is null, empty, or all whitespace
}

Reply via email to