FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
string.hpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. Todos los derechos reservados.
2// El uso de este código fuente se rige por la licencia MIT que se puede encontrar en
3// el archivo 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// Divide la cadena en sus glifos. Se inserta uno vacío después de los de ancho completo.
22std::vector<std::string> Utf8ToGlyphs(const std::string& input);
23
24// Asigna cada celda dibujada por |input| a sus glifos correspondientes. Los glifos de
25// tamaño medio ocupan una celda, los glifos de tamaño completo ocupan dos celdas.
26std::vector<int> CellToGlyphIndex(const std::string& input);
27
28} // namespace ftxui
29
30#endif /* end of include guard: FTXUI_SCREEN_STRING_HPP */
El espacio de nombres ftxui:: de FTXUI.
Definition animation.hpp:10
std::vector< std::string > Utf8ToGlyphs(const std::string &input)
Definition string.cpp:1366
int string_width(const std::string &)
Definition string.cpp:1339
std::wstring to_wstring(const std::string &s)
std::string to_string(const std::wstring &s)
std::vector< int > CellToGlyphIndex(const std::string &input)