mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-10-31 08:19:34 +08:00
cd84b187b3
Introduce Options for components. This allows me to add new features, without updating functions signatures.
29 lines
730 B
C++
29 lines
730 B
C++
#ifndef FTXUI_SCREEN_STRING_HPP
|
|
#define FTXUI_SCREEN_STRING_HPP
|
|
|
|
#include <string>
|
|
|
|
namespace ftxui {
|
|
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(char32_t);
|
|
int wchar_width(wchar_t);
|
|
int wchar_width_cjk(char32_t);
|
|
int wchar_width_cjk(wchar_t);
|
|
int wstring_width(const std::wstring&);
|
|
int wstring_width_cjk(const std::wstring&);
|
|
|
|
} // 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.
|