2020-04-20 03:00:37 +08:00
|
|
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
|
|
|
// Use of this source code is governed by the MIT license that can be found in
|
|
|
|
// the LICENSE file.
|
|
|
|
|
2019-01-23 07:26:36 +08:00
|
|
|
#include <sstream>
|
2020-03-23 05:32:44 +08:00
|
|
|
|
2019-01-23 07:26:36 +08:00
|
|
|
#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' ')) {
|
2019-01-23 09:16:00 +08:00
|
|
|
output.push_back(text(word + L' '));
|
2019-01-23 07:26:36 +08:00
|
|
|
}
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace ftxui
|