boostorg / algorithm

Boost.org algorithm module
http://boost.org/libs/algorithm
Boost Software License 1.0
112 stars 105 forks source link

Add 'boost::intersperse' string algorithm #111

Open denzor200 opened 1 year ago

denzor200 commented 1 year ago

Analague of ranges::views::intersperse from range-v3 library.

const std::string input{"foobarbaxbat"};
std::cout << boost::intersperse_copy(input, ',') << '\n';      // Outputs: f,o,o,b,a,r,b,a,x,b,a,t
jgopel commented 1 year ago

👍 LGTM - @mclow will have to approve.

denzor200 commented 1 year ago

@mclow hello, would you like to review this PR?