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:
ArthurSonzogni
2019-06-24 23:39:37 +02:00
parent 9c1913de51
commit eb6baaceea
8 changed files with 358 additions and 16 deletions

View File

@@ -43,16 +43,6 @@ Event ParseUTF8(std::function<char()>& getchar, std::string& input) {
return Event::Character(input);
}
void ParsePs(std::function<char()> getchar, std::string input) {
while (1) {
char key = getchar();
input += key;
if ('0' <= key && key <= '9')
continue;
return;
}
}
Event ParseCSI(std::function<char()> getchar, std::string& input) {
while (1) {
char c = getchar();