FTXUI/src/ftxui/dom/paragraph.cpp

17 lines
320 B
C++
Raw Normal View History

2019-01-23 07:26:36 +08:00
#include <sstream>
#include "ftxui/dom/elements.hpp"
namespace ftxui {
Elements paragraph(std::wstring the_text) {
Elements output;
std::wstringstream ss(the_text);
std::wstring word;
while (std::getline(ss, word, L' ')) {
output.push_back(text(word + L' '));
2019-01-23 07:26:36 +08:00
}
return output;
}
} // namespace ftxui