Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-13 Thread Jonathan M Davis via Digitalmars-d-learn
5 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, empt

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, October 13, 2017 07:36:28 bauss via Digitalmars-d-learn wrote: > 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() &g

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-13 Thread Daniel Kozak via Digitalmars-d-learn
Yes I beleive it is neat functionality. I just dont like those names :) On Fri, Oct 13, 2017 at 8:36 AM, Jacob Carlborg via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On 2017-10-12 21:42, Daniel Kozak wrote: > >> Wow, C# is really wierd. They have method IsNullOrEmpty (OK

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-13 Thread bauss via Digitalmars-d-learn
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

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-10-12 21:42, Daniel Kozak wrote: Wow, C# is really wierd. They have method IsNullOrEmpty (OK why not), but they have IsNullOrWhiteSpace OK little akward but still OK until you realized it is more like IsNullOrEmptyOrWhiteSpace :D It's pretty neat functionality. Ruby has it (or rather

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-12 Thread Daniel Kozak via Digitalmars-d-learn
com> wrote: > Does D have an equivalent to C#'s String.IsNullOrWhiteSpace() in the > standard library? > just asking if there's a native one, so I don't need reinvente the wheel > > https://msdn.microsoft.com/en-us/library/system.string.isnul > lorwhitespace%28v=vs.110%29.aspx?f=255=-2147217396 >

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-12 Thread Jesse Phillips via Digitalmars-d-learn
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

Re: Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-12 Thread Adam D. Ruppe via Digitalmars-d-learn
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 }

Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-12 Thread Nieto via Digitalmars-d-learn
Does D have an equivalent to C#'s String.IsNullOrWhiteSpace() in the standard library? just asking if there's a native one, so I don't need reinvente the wheel https://msdn.microsoft.com/en-us/library/system.string.isnullorwhitespace%28v=vs.110%29.aspx?f=255=-2147217396