Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inline std::string SpacesToNewLines(const std::string& text)
- {
- std::string format = text;
- unsigned int pos = format.find(" ");
- while(pos <= format.size())
- {
- format.replace(pos, 1, "\n");
- pos = format.find(" ", pos);
- }
- return format;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement