FTXUI  0.8.1
C++ functional terminal UI.
string.hpp
Go to the documentation of this file.
1 #ifndef FTXUI_SCREEN_STRING_HPP
2 #define FTXUI_SCREEN_STRING_HPP
3 
4 #include <string> // for string, wstring, to_string
5 #include <vector> // for vector
6 
7 namespace ftxui {
8 std::string to_string(const std::wstring& s);
9 std::wstring to_wstring(const std::string& s);
10 
11 template <typename T>
12 std::wstring to_wstring(T s) {
13  return to_wstring(std::to_string(s));
14 }
15 
16 int string_width(const std::string&);
17 std::vector<std::string> Utf8ToGlyphs(const std::string& input);
18 
19 } // namespace ftxui
20 
22 
23 #endif /* end of include guard: FTXUI_SCREEN_STRING_HPP */
24 
25 // Copyright 2020 Arthur Sonzogni. All rights reserved.
26 // Use of this source code is governed by the MIT license that can be found in
27 // the LICENSE file.
ftxui
Definition: captured_mouse.hpp:6
ftxui::to_string
std::string to_string(const std::wstring &s)
Convert a UTF8 std::string into a std::wstring.
Definition: string.cpp:297
ftxui::to_wstring
std::wstring to_wstring(const std::string &s)
Convert a std::wstring into a UTF8 std::string.
Definition: string.cpp:303
deprecated.hpp
ftxui::Utf8ToGlyphs
std::vector< std::string > Utf8ToGlyphs(const std::string &input)
Definition: string.cpp:250
ftxui::string_width
int string_width(const std::string &)
Definition: string.cpp:226