Re: [PATCH v3 7/7] send-email: suppress leading and trailing whitespaces before alias expansion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remi Lespinet <remi.lespinet@xxxxxxxxxxxxxxxxxxxxxxx> writes:

> I agree, I'd like to put it right after split_at_commas in a separate
> function "trim_list". Is it a good idea even if the function is one
> line long ?

Hmph, if I have "A, B, C" and call a function that gives an array of
addresses, treating the input as comma-separated addresses, I would
expect ("A", "B", "C") to be returned from that function, instead of
having to later trim the whitespace around what is returned.

It suggests that split-at-commas _is_ a wrong abstraction, doesn't
it?  In other words, I think whitespace trimming is part of what the
split-a-single-string-into-array-of-addresses helper function should
be doing.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]