replaceFirst, findPieces, and takeExactly
spir
denis.spir at gmail.com
Sat Jan 22 19:42:27 PST 2011
On 01/23/2011 12:40 AM, so wrote:
>> Yes, I'm absolutely in agreement with the naming (and thrilled too). I
>> imagine a putative user looking through std.algorithm ("let's see...
>> what find functions are out there?"). That makes findPieces easy to
>> get to, whereas "trisect" would be oddly situated in the alphabetic
>> list and oddly named enough to be virtually undiscoverable.
>
> If this is the reasoning. This is a split function, not a find.
> There will be a few more of these split functions i suppose and this is
> the reason of my proposal splitAt.
> It is in the definition of the function you quoted.
>
> "(Split) the string (at) the first occurrence of (sep)"
>
> splitAt(string, sep)
+++
splitAt is simply a Good Name! (even better than "tripartite" ;-)
Also for finding it in list of funcs.
Denis
_________________
vita es estrany
spir.wikidot.com
More information about the Digitalmars-d
mailing list