serde_with icon indicating copy to clipboard operation
serde_with copied to clipboard

Add `with_suffix` macro?

Open tobiasvl opened this issue 4 years ago • 1 comments

Perhaps not such a common use case as stripping prefixes, but it would be nice if there was a symmetrical with_suffix macro that could strip suffixes.

tobiasvl avatar Oct 22 '21 09:10 tobiasvl

Hi, thanks for the interest. I am open to accepting a PR to add this macro. I have not seen much demand for such a macro so far.

The implementation can probably mostly be taken from the existing with_prefix macro, the main differences being the parts where the prefix is added/stripped.

jonasbb avatar Oct 22 '21 21:10 jonasbb

If someone needs this, feel welcome to submit a PR. But I would rather not keep the issue open indefinitely.

jonasbb avatar May 03 '23 19:05 jonasbb