MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/w5tfr7/finally_embed/ihf8e0u/?context=3
r/cpp • u/pavel_v • Jul 23 '22
202 comments sorted by
View all comments
Show parent comments
0
[deleted]
4 u/[deleted] Jul 23 '22 Functions I have to copy/paste into most code bases:replace all occurrences of substring by new substringtrim whitespace or other characters from left/right/bothconvert entire string to lower/upper casesplit a string by spaces/comma/substringI would have added "begins with" and "ends with" to that list, but that recently made it into the standard, yay. 0 u/[deleted] Jul 24 '22 [deleted] 4 u/dodheim Jul 24 '22 Yeah sadly I don't think we can do that easily.It already just works; in fact it's what the cppreference example for views::split does.
4
Functions I have to copy/paste into most code bases:
replace all occurrences of substring by new substring
trim whitespace or other characters from left/right/both
convert entire string to lower/upper case
split a string by spaces/comma/substring
I would have added "begins with" and "ends with" to that list, but that recently made it into the standard, yay.
0 u/[deleted] Jul 24 '22 [deleted] 4 u/dodheim Jul 24 '22 Yeah sadly I don't think we can do that easily.It already just works; in fact it's what the cppreference example for views::split does.
4 u/dodheim Jul 24 '22 Yeah sadly I don't think we can do that easily.It already just works; in fact it's what the cppreference example for views::split does.
Yeah sadly I don't think we can do that easily.
It already just works; in fact it's what the cppreference example for views::split does.
views::split
0
u/[deleted] Jul 23 '22
[deleted]