Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- std::string::iterator function(std::string::const_iterator a, std::string::const_iterator b, std::string::iterator wyjscie)
- {
- while (a != b)
- {
- char znak = *a;;
- while (isspace(*a) && a != b)
- {
- ++a;
- }
- if (isspace(znak))
- {
- *wyjscie++ = ' ';
- }
- else
- {
- *wyjscie++ = znak;
- ++a;
- }
- }
- return wyjscie;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement