FTXUI 6.1.9
C++ functional terminal UI.
Chargement...
Recherche...
Aucune correspondance
string.hpp
Aller à la documentation de ce fichier.
1// Copyright 2020 Arthur Sonzogni. Tous droits réservés.
2// L'utilisation de ce code source est régie par la licence MIT que l'on trouve dans
3// le fichier LICENSE.
4#ifndef FTXUI_SCREEN_STRING_HPP
5#define FTXUI_SCREEN_STRING_HPP
6
7#include <string> // for string, wstring, to_string
8#include <vector> // for vector
9
10namespace ftxui {
11std::string to_string(const std::wstring& s);
12std::wstring to_wstring(const std::string& s);
13
14template <typename T>
15std::wstring to_wstring(T s) {
16 return to_wstring(std::to_string(s));
17}
18
19int string_width(const std::string&);
20
21// Divise la chaîne en ses glyphes. Un glyphe vide est inséré après les glyphes pleine largeur.
22std::vector<std::string> Utf8ToGlyphs(const std::string& input);
23
24// Associe chaque cellule dessinée par |input| à son glyphe correspondant. Les glyphes de demi-taille
25// prennent une cellule, les glyphes de pleine taille en prennent deux.
26std::vector<int> CellToGlyphIndex(const std::string& input);
27
28} // namespace ftxui
29
30#endif /* Fin de la garde d'inclusion: FTXUI_SCREEN_STRING_HPP */
L'espace de noms FTXUI ftxui::
Definition animation.hpp:10
std::vector< std::string > Utf8ToGlyphs(const std::string &input)
Definition string.cpp:1358
int string_width(const std::string &)
Definition string.cpp:1331
std::wstring to_wstring(const std::string &s)
Convertit un std::string UTF8 en un std::wstring.
Definition string.cpp:1638
std::string to_string(const std::wstring &s)
Convertit un std::wstring en un std::string UTF8.
Definition string.cpp:1566
std::vector< int > CellToGlyphIndex(const std::string &input)
Definition string.cpp:1465