std.string.strip() removes whitespace, but the docs make no mention of a version that receives a set of delimiters.
If it exists, it should be documented/linked, if it doesn't, it should probably be added.
(In reply to b2.temp from comment #1)
> Since std.algorithm.mutation.strip/Left/Right do the job
> (http://dlang.org/phobos/std_algorithm_mutation.html#.strip)
> I think your report is invalid.
"If it exists, it should be documented/linked"
Comment #3 by turkeyman — 2016-02-28T05:23:35Z
It is so hard to do string manipulation in phobos. Nobody I've encountered yet can find most of the functions, they're scattered among 4, 5, 6? modules. Unless you already know what the function names are, and where they are, how can people find what they want? They do an exhaustive search through a bunch of modules hoping to stumble upon it.
My feeling is that it wouldn't hurt for std.string to alias the hell out of other modules and make all the conventional string operations available in one place.
Comment #4 by b2.temp — 2016-02-28T06:47:43Z
(In reply to Manu from comment #3)
> It is so hard to do string manipulation in phobos. Nobody I've encountered
> yet can find most of the functions, they're scattered among 4, 5, 6?
> modules. Unless you already know what the function names are, and where they
> are, how can people find what they want? They do an exhaustive search
> through a bunch of modules hoping to stumble upon it.
>
> My feeling is that it wouldn't hurt for std.string to alias the hell out of
> other modules and make all the conventional string operations available in
> one place.
I agree, after reading your BR, I've myself done the error to write a popWhile() function using a predicate for my user lib after what I've remembered about algorithm.mutation, but it was too late...
Maybe a note in the std.string doc: "see also: for more generic strip funcyion..."
Comment #5 by ag0aep6g — 2016-02-28T10:24:39Z
(In reply to b2.temp from comment #4)
> Maybe a note in the std.string doc: "see also: for more generic strip
> funcyion..."
Already there: "There is a rich set of functions for string handling defined in other modules. Functions related to Unicode and ASCII are found in std.uni and std.ascii, respectively. Other functions that have a wider generality than just strings can be found in std.algorithm and std.range."
Comment #6 by ag0aep6g — 2016-02-28T10:26:58Z
(In reply to ag0aep6g from comment #5)
> (In reply to b2.temp from comment #4)
> > Maybe a note in the std.string doc: "see also: for more generic strip
> > funcyion..."
>
> Already there: "There is a rich set of functions for string handling defined
> in other modules. Functions related to Unicode and ASCII are found in
> std.uni and std.ascii, respectively. Other functions that have a wider
> generality than just strings can be found in std.algorithm and std.range."
Whoops, you were talking about strip's docs specifically. Sorry for the noise.
Comment #7 by github-bugzilla — 2016-02-29T22:26:56Z