Files
FTXUI/en/v0.10/string_8hpp.html
2025-11-12 12:56:59 +00:00

269 lines
18 KiB
HTML

<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FTXUI: include/ftxui/screen/string.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">FTXUI
&#160;<span id="projectnumber">0.10.0</span>
</div>
<div id="projectbrief">C++ functional terminal UI.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('string_8hpp.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">string.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><div id="dynsection-0" onclick="return dynsection.toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> This graph shows which files directly or indirectly include this file:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="string_8hpp__dep__incl.png" border="0" usemap="#ainclude_2ftxui_2screen_2string_8hppdep" alt=""/></div>
<map name="ainclude_2ftxui_2screen_2string_8hppdep" id="ainclude_2ftxui_2screen_2string_8hppdep">
<area shape="rect" title=" " alt="" coords="724,5,873,45"/>
<area shape="rect" href="ref_8hpp.html" title=" " alt="" coords="482,93,609,133"/>
<area shape="poly" title=" " alt="" coords="731,52,602,96,600,91,729,47"/>
<area shape="rect" href="input_8cpp.html" title=" " alt="" coords="557,445,707,485"/>
<area shape="poly" title=" " alt="" coords="710,30,513,39,396,49,280,64,174,86,87,116,54,134,29,154,13,176,8,200,8,291,10,325,17,351,31,373,56,395,94,414,147,429,212,441,284,449,431,459,557,462,556,467,431,464,283,454,211,446,146,434,92,419,53,400,27,377,12,353,4,325,3,291,3,200,9,173,25,150,51,129,85,111,173,81,280,59,396,44,512,34,710,25"/>
<area shape="rect" href="event_8cpp.html" title=" " alt="" coords="633,93,783,133"/>
<area shape="poly" title=" " alt="" coords="771,57,730,95,726,91,767,53"/>
<area shape="rect" href="text_8cpp.html" title=" " alt="" coords="807,101,971,126"/>
<area shape="poly" title=" " alt="" coords="830,53,879,98,875,102,827,57"/>
<area shape="rect" href="screen_8cpp.html" title=" " alt="" coords="996,101,1191,126"/>
<area shape="poly" title=" " alt="" coords="877,47,1055,98,1053,103,876,52"/>
<area shape="rect" href="string_8cpp.html" title=" " alt="" coords="1215,101,1404,126"/>
<area shape="poly" title=" " alt="" coords="887,38,1203,91,1246,98,1245,103,1202,96,886,44"/>
<area shape="rect" href="component_8hpp.html" title=" " alt="" coords="1355,269,1533,309"/>
<area shape="poly" title=" " alt="" coords="623,131,1036,214,1355,270,1354,276,1035,219,622,136"/>
<area shape="poly" title=" " alt="" coords="469,132,323,169,243,195,169,226,108,262,85,282,69,302,60,324,58,347,66,370,83,395,106,407,149,418,277,436,426,449,556,458,556,463,426,455,276,442,148,423,104,412,80,399,61,373,53,347,54,323,64,300,81,278,105,258,166,221,241,190,321,163,468,127"/>
<area shape="rect" href="button_8cpp.html" title=" " alt="" coords="94,357,245,397"/>
<area shape="poly" title=" " alt="" coords="508,144,198,359,195,355,505,139"/>
<area shape="rect" href="checkbox_8cpp.html" title=" " alt="" coords="269,357,419,397"/>
<area shape="poly" title=" " alt="" coords="525,146,361,359,357,355,521,142"/>
<area shape="rect" href="menu_8cpp.html" title=" " alt="" coords="443,357,594,397"/>
<area shape="poly" title=" " alt="" coords="527,146,511,182,504,230,504,279,516,356,511,357,499,280,498,230,505,181,522,144"/>
<area shape="rect" href="radiobox_8cpp.html" title=" " alt="" coords="2519,357,2670,397"/>
<area shape="poly" title=" " alt="" coords="622,131,758,150,922,169,1297,204,1669,237,1956,267,2233,306,2507,355,2519,357,2518,362,2506,360,2232,311,1956,272,1668,242,1297,209,921,174,757,155,622,136"/>
<area shape="rect" href="slider_8cpp.html" title=" " alt="" coords="2694,357,2845,397"/>
<area shape="poly" title=" " alt="" coords="622,131,800,153,939,162,1077,167,1254,179,1684,217,2114,267,2399,306,2682,355,2694,357,2693,362,2681,360,2398,311,2113,272,1684,222,1253,184,1077,172,938,167,799,159,622,136"/>
<area shape="rect" href="toggle_8cpp.html" title=" " alt="" coords="670,357,821,397"/>
<area shape="poly" title=" " alt="" coords="623,134,679,155,702,167,717,180,731,201,741,225,751,274,753,321,751,357,745,357,748,321,746,275,736,226,726,204,713,183,699,172,677,160,621,139"/>
<area shape="rect" href="component__options_8hpp.html" title=" " alt="" coords="521,181,703,221"/>
<area shape="poly" title=" " alt="" coords="571,143,599,179,595,183,566,146"/>
<area shape="rect" href="component_2deprecated_8hpp.html" title=" " alt="" coords="2316,357,2495,397"/>
<area shape="poly" title=" " alt="" coords="1547,293,1879,314,2084,332,2291,355,2316,358,2315,364,2290,360,2084,337,1878,319,1547,298"/>
<area shape="poly" title=" " alt="" coords="1548,297,1620,310,1683,329,1706,343,1719,359,1721,378,1707,399,1692,407,1663,413,1569,425,1283,444,960,457,708,465,708,459,959,452,1283,438,1568,419,1662,408,1690,401,1704,395,1715,376,1714,361,1702,347,1681,334,1619,315,1547,303"/>
<area shape="poly" title=" " alt="" coords="1341,294,1140,297,870,307,565,327,409,342,256,360,245,362,244,356,256,355,408,336,564,322,870,302,1140,292,1341,288"/>
<area shape="rect" href="catch__event_8cpp.html" title=" " alt="" coords="1770,357,1921,397"/>
<area shape="poly" title=" " alt="" coords="1546,310,1770,357,1769,363,1545,315"/>
<area shape="poly" title=" " alt="" coords="1341,295,1168,301,941,312,687,331,431,360,420,362,419,356,430,355,686,326,941,307,1168,295,1341,290"/>
<area shape="rect" href="component_8cpp.html" title=" " alt="" coords="1945,357,2095,397"/>
<area shape="poly" title=" " alt="" coords="1547,300,1727,323,1932,355,1945,357,1944,362,1932,360,1727,328,1547,305"/>
<area shape="rect" href="component__fuzzer_8cpp.html" title=" " alt="" coords="2119,357,2291,397"/>
<area shape="poly" title=" " alt="" coords="1548,296,1802,318,2107,355,2120,357,2119,362,2106,360,1802,324,1547,301"/>
<area shape="rect" href="container_8cpp.html" title=" " alt="" coords="845,357,995,397"/>
<area shape="poly" title=" " alt="" coords="1342,307,1184,330,1007,360,996,362,995,357,1006,355,1183,325,1341,302"/>
<area shape="rect" href="dropdown_8cpp.html" title=" " alt="" coords="1019,357,1170,397"/>
<area shape="poly" title=" " alt="" coords="1355,315,1171,360,1170,355,1354,310"/>
<area shape="rect" href="maybe_8cpp.html" title=" " alt="" coords="1194,357,1345,397"/>
<area shape="poly" title=" " alt="" coords="1395,318,1309,360,1306,355,1392,313"/>
<area shape="poly" title=" " alt="" coords="1341,300,1034,324,658,360,594,368,594,363,657,355,1034,319,1340,295"/>
<area shape="poly" title=" " alt="" coords="1548,289,1729,295,1968,306,2236,325,2507,355,2519,357,2519,362,2506,360,2236,330,1967,311,1729,300,1547,295"/>
<area shape="rect" href="renderer_8cpp.html" title=" " alt="" coords="1369,357,1519,397"/>
<area shape="poly" title=" " alt="" coords="1447,323,1447,357,1441,357,1441,323"/>
<area shape="rect" href="resizable__split_8cpp.html" title=" " alt="" coords="1543,357,1694,397"/>
<area shape="poly" title=" " alt="" coords="1496,313,1582,355,1579,360,1493,318"/>
<area shape="poly" title=" " alt="" coords="1547,288,1755,291,2037,301,2358,321,2522,336,2682,355,2694,357,2693,362,2681,360,2521,341,2357,326,2037,307,1755,297,1547,293"/>
<area shape="poly" title=" " alt="" coords="1341,301,1108,324,832,360,821,362,820,357,832,355,1107,318,1341,296"/>
<area shape="poly" title=" " alt="" coords="2302,358,2085,335,1871,317,1533,297,1534,292,1871,312,2086,329,2303,353"/>
<area shape="poly" title=" " alt="" coords="2303,400,2065,422,1824,439,1360,460,968,467,708,467,708,462,968,462,1359,454,1823,434,2065,417,2302,395"/>
<area shape="poly" title=" " alt="" coords="717,211,1355,276,1354,281,717,216"/>
<area shape="poly" title=" " alt="" coords="617,235,633,445,628,445,612,235"/>
<area shape="poly" title=" " alt="" coords="553,229,218,360,216,355,551,224"/>
<area shape="poly" title=" " alt="" coords="573,231,375,359,372,355,570,227"/>
<area shape="poly" title=" " alt="" coords="598,235,531,358,526,356,593,232"/>
<area shape="poly" title=" " alt="" coords="718,204,1023,217,1466,245,1719,265,1982,289,2248,319,2507,355,2519,357,2518,362,2506,360,2247,325,1982,295,1719,270,1466,250,1023,223,717,209"/>
<area shape="poly" title=" " alt="" coords="637,231,733,356,729,359,633,234"/>
</map>
</div>
</div>
<p><a href="string_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html">ftxui</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a757b345f73bb6cde5165a4d7f0c0a298" id="r_a757b345f73bb6cde5165a4d7f0c0a298"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a757b345f73bb6cde5165a4d7f0c0a298">to_string</a> (const std::wstring &amp;s)</td></tr>
<tr class="memdesc:a757b345f73bb6cde5165a4d7f0c0a298"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a UTF8 std::string into a std::wstring. <br /></td></tr>
<tr class="separator:a757b345f73bb6cde5165a4d7f0c0a298"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57429a83a46c643a81dee81e49384439" id="r_a57429a83a46c643a81dee81e49384439"><td class="memItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a57429a83a46c643a81dee81e49384439">to_wstring</a> (const std::string &amp;s)</td></tr>
<tr class="memdesc:a57429a83a46c643a81dee81e49384439"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a std::wstring into a UTF8 std::string. <br /></td></tr>
<tr class="separator:a57429a83a46c643a81dee81e49384439"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24ea52e8ef70889ef1da986837e0ff34" id="r_a24ea52e8ef70889ef1da986837e0ff34"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a24ea52e8ef70889ef1da986837e0ff34"><td class="memTemplItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a24ea52e8ef70889ef1da986837e0ff34">to_wstring</a> (T s)</td></tr>
<tr class="separator:a24ea52e8ef70889ef1da986837e0ff34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a517b35c7721e632812d8b3a7697c4099" id="r_a517b35c7721e632812d8b3a7697c4099"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a517b35c7721e632812d8b3a7697c4099">string_width</a> (const std::string &amp;)</td></tr>
<tr class="separator:a517b35c7721e632812d8b3a7697c4099"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a389c58d385e861cd2ef109b53fc6ef96" id="r_a389c58d385e861cd2ef109b53fc6ef96"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceftxui.html#a389c58d385e861cd2ef109b53fc6ef96">Utf8ToGlyphs</a> (const std::string &amp;input)</td></tr>
<tr class="separator:a389c58d385e861cd2ef109b53fc6ef96"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const projectNumber = document.getElementById('projectnumber');
if (!projectNumber) {
console.warn('Doxygen element with ID "projectnumber" not found. Cannot add version switcher.');
return;
}
const versions = ["main", "v6.1.9", "v6.1.8", "v6.1.7", "v6.1.6", "v6.1.5", "v6.1.4", "v6.1.3", "v6.1.2", "v6.1.1", "v6.1.0", "v6.0.2", "v6.0.1", "v6.0.0", "v5.0.0", "v4.1.1", "v4.1.0", "v4.0.0", "v3.0.0", "v2.0.0", "v0.9", "v0.11", "v0.10"];
const version_paths = {"main": "../../index.html", "v6.1.9": "../v6.1.9/index.html", "v6.1.8": "../v6.1.8/index.html", "v6.1.7": "../v6.1.7/index.html", "v6.1.6": "../v6.1.6/index.html", "v6.1.5": "../v6.1.5/index.html", "v6.1.4": "../v6.1.4/index.html", "v6.1.3": "../v6.1.3/index.html", "v6.1.2": "../v6.1.2/index.html", "v6.1.1": "../v6.1.1/index.html", "v6.1.0": "../v6.1.0/index.html", "v6.0.2": "../v6.0.2/index.html", "v6.0.1": "../v6.0.1/index.html", "v6.0.0": "../v6.0.0/index.html", "v5.0.0": "../v5.0.0/index.html", "v4.1.1": "../v4.1.1/index.html", "v4.1.0": "../v4.1.0/index.html", "v4.0.0": "../v4.0.0/index.html", "v3.0.0": "../v3.0.0/index.html", "v2.0.0": "../v2.0.0/index.html", "v0.9": "../v0.9/index.html", "v0.11": "../v0.11/index.html", "v0.10": "index.html"};
const currentVersion = "v0.10";
// Sort versions: 'main' first, then others numerically descending.
versions.sort((a, b) => {
if (a === 'main') return -1;
if (b === 'main') return 1;
return b.localeCompare(a, undefined, { numeric: true, sensitivity: 'base' });
});
const select = document.createElement('select');
select.onchange = function() {
const selectedVersion = this.value;
// Navigate directly to the pre-calculated relative path.
if (selectedVersion !== currentVersion) {
window.location.href = version_paths[selectedVersion];
}
};
versions.forEach(v => {
const option = document.createElement('option');
option.value = v;
option.textContent = v;
if (v === currentVersion) {
option.selected = true;
}
select.appendChild(option);
});
// Replace the Doxygen project number element with our dropdown.
projectNumber.replaceWith(select);
// Apply some styling to make it look good.
Object.assign(select.style, {
backgroundColor: 'rgba(0, 0, 0, 0.8)',
color: 'white',
border: '1px solid rgba(255, 255, 255, 0.2)',
padding: '5px',
borderRadius: '5px',
fontSize: '14px',
fontFamily: 'inherit',
marginLeft: '10px',
cursor: 'pointer'
});
});
</script>
</body>
</html>