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. 無断複写・転載を禁じます。
2// このソースコードの使用は、MITライセンスに準拠しています。
3// ライセンスファイルに記載されています。
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// 文字列をグリフに分割します。全角グリフの後には空のグリフが挿入されます。
22std::vector<std::string> Utf8ToGlyphs(const std::string& input);
23
24// |input|によって描画されるすべてのセルを対応するグリフにマッピングします。半角
25// グリフは1セルを占め、全角グリフは2セルを占めます。
26std::vector<int> CellToGlyphIndex(const std::string& input);
27
28} // namespace ftxui
29
30#endif /* end of include guard: FTXUI_SCREEN_STRING_HPP */
FTXUI ftxui:: 名前空間
Definition animation.hpp:9
std::vector< std::string > Utf8ToGlyphs(const std::string &input)
Definition string.cpp:1351
int string_width(const std::string &)
Definition string.cpp:1324
std::wstring to_wstring(const std::string &s)
std::string to_string(const std::wstring &s)
std::vector< int > CellToGlyphIndex(const std::string &input)