FTXUI/include/ftxui/screen/string.hpp

28 lines
719 B
C++
Raw Normal View History

#ifndef FTXUI_SCREEN_STRING_HPP
#define FTXUI_SCREEN_STRING_HPP
2018-09-18 14:48:40 +08:00
#include <string>
#include <vector>
2018-09-18 14:48:40 +08:00
2020-08-09 20:53:56 +08:00
namespace ftxui {
2018-09-18 14:48:40 +08:00
std::string to_string(const std::wstring& s);
std::wstring to_wstring(const std::string& s);
template <typename T>
std::wstring to_wstring(T s) {
return to_wstring(std::to_string(s));
}
int wchar_width(wchar_t);
int wstring_width(const std::wstring&);
int string_width(const std::string&);
std::vector<std::string> Utf8ToGlyphs(const std::string& input);
2020-08-09 20:53:56 +08:00
} // namespace ftxui
#endif /* end of include guard: FTXUI_SCREEN_STRING_HPP */
// 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.