Re: Ranges suck!

2017-09-15 Thread bitwise via Digitalmars-d-learn
On Thursday, 14 September 2017 at 23:53:20 UTC, Your name wrote: [...] I understand your frustration. The fact that "inout" is actually a keyword makes it hard not to think that some very strange fetishes were at play during the creation of this language. As a whole though, the language is

Re: Ranges suck!

2017-09-14 Thread Ali Çehreli via Digitalmars-d-learn
On 09/14/2017 04:53 PM, Your name wrote: > Why can't I simply do somestring.strip("\n")??? Actually, you can but that's a different one: std.algorithm.strip and it takes the element type, so you should provide a char: somestring = somestring.strip('\n'); (Note: I lied about element type

Re: Ranges suck!

2017-09-14 Thread Brad Anderson via Digitalmars-d-learn
On Thursday, 14 September 2017 at 23:53:20 UTC, Your name wrote: Every time I go to use something like strip it bitches and gives me errors. Why can't I simply do somestring.strip("\n")??? import std.string would be the likely strip yet it takes a range and somestring, for some retarded reason

Ranges suck!

2017-09-14 Thread Your name via Digitalmars-d-learn
Every time I go to use something like strip it bitches and gives me errors. Why can't I simply do somestring.strip("\n")??? import std.string would be the likely strip yet it takes a range and somestring, for some retarded reason, isn't a range. strip isn't the only function that does this. Wh