mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-15 23:48:15 +08:00
Support full-width characters (CJK)
+ 3 tests. The goal is to fix: https://github.com/ArthurSonzogni/FTXUI/issues/2#issuecomment-504871456
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#ifndef FTXUI_SCREEN_STRING_HPP
|
||||
#define FTXUI_SCREEN_STRING_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
std::string to_string(const std::wstring& s);
|
||||
@@ -7,3 +10,10 @@ template<typename T>
|
||||
std::wstring to_wstring(T s) {
|
||||
return to_wstring(std::to_string(s));
|
||||
}
|
||||
|
||||
int wchar_width(wchar_t);
|
||||
int wchar_width_cjk(wchar_t);
|
||||
int wstring_width(const std::wstring&);
|
||||
int wstring_width_cjk(const std::wstring&);
|
||||
|
||||
#endif /* end of include guard: FTXUI_SCREEN_STRING_HPP */
|
||||
|
Reference in New Issue
Block a user