Skip to content

Commit f9ea4a4

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 70c63bc commit f9ea4a4

File tree

9 files changed

+815
-544
lines changed

9 files changed

+815
-544
lines changed

reference/sstream/basic_istringstream/str.html

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
</head>
7070
<body>
71-
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;sstream&#34;], &#34;namespace&#34;: [&#34;std&#34;], &#34;class&#34;: [&#34;basic_istringstream&#34;], &#34;id-type&#34;: [&#34;function&#34;]}, &#34;sources&#34;: [], &#34;page_id&#34;: [&#34;reference&#34;, &#34;sstream&#34;, &#34;basic_istringstream&#34;, &#34;str&#34;]}">
71+
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;sstream&#34;], &#34;namespace&#34;: [&#34;std&#34;], &#34;class&#34;: [&#34;basic_istringstream&#34;], &#34;id-type&#34;: [&#34;function&#34;]}, &#34;sources&#34;: [{&#34;id&#34;: &#34;8ac20eab784310a3051a39eb0c9ea1c8b4bd7f99&#34;, &#34;source&#34;: &#34;#include &lt;iostream&gt;\n#include &lt;sstream&gt;\n#include &lt;string&gt;\n\nint main()\n{\n // \u6587\u5b57\u5217\u306e\u53d6\u5f97\n std::istringstream iss(\&#34;Hello World 123 45.67\&#34;);\n std::cout &lt;&lt; \&#34;Content: \&#34; &lt;&lt; iss.str() &lt;&lt; std::endl;\n\n // \u4e00\u90e8\u3092\u8aad\u307f\u53d6\u3063\u3066\u3082\u3001str()\u306f\u5168\u4f53\u3092\u8fd4\u3059\n std::string word;\n iss &gt;&gt; word;\n std::cout &lt;&lt; \&#34;Read word: \&#34; &lt;&lt; word &lt;&lt; std::endl;\n std::cout &lt;&lt; \&#34;Full content: \&#34; &lt;&lt; iss.str() &lt;&lt; std::endl;\n\n // \u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\n iss.str(\&#34;New content 999\&#34;);\n iss.clear(); // \u30a8\u30e9\u30fc\u30d5\u30e9\u30b0\u3092\u30af\u30ea\u30a2\n\n // \u65b0\u3057\u3044\u5185\u5bb9\u304b\u3089\u8aad\u307f\u53d6\u308a\n std::string s1, s2;\n int num;\n iss &gt;&gt; s1 &gt;&gt; s2 &gt;&gt; num;\n std::cout &lt;&lt; \&#34;New read: \&#34; &lt;&lt; s1 &lt;&lt; \&#34; \&#34; &lt;&lt; s2 &lt;&lt; \&#34; \&#34; &lt;&lt; num &lt;&lt; std::endl;\n\n // \u7a7a\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\u3057\u3066\u30ea\u30bb\u30c3\u30c8\n iss.str(\&#34;\&#34;);\n std::cout &lt;&lt; \&#34;Empty? \&#34; &lt;&lt; (iss.str().empty() ? \&#34;yes\&#34; : \&#34;no\&#34;) &lt;&lt; std::endl;\n}\n&#34;}], &#34;page_id&#34;: [&#34;reference&#34;, &#34;sstream&#34;, &#34;basic_istringstream&#34;, &#34;str&#34;]}">
7272
<nav class="navbar navbar-default" role="navigation">
7373
<div class="container-fluid">
7474
<div class="navbar-header">
@@ -200,8 +200,8 @@
200200

201201
<p class="text-right"><small>
202202
最終更新日時(UTC):
203-
<span itemprop="datePublished" content="2025-06-05T03:37:16">
204-
2025年06月05日 03時37分16秒
203+
<span itemprop="datePublished" content="2025-06-05T03:56:00">
204+
2025年06月05日 03時56分00秒
205205
</span>
206206
<br/>
207207
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -251,6 +251,46 @@ <h2>効果</h2>
251251
<li>(5) : <code>rdbuf()-&gt;str(s)</code> と等価</li>
252252
<li>(6) : <code>rdbuf()-&gt;str(std::move(s))</code> と等価</li>
253253
</ul>
254+
<h2></h2>
255+
<p><div class="yata" id="8ac20eab784310a3051a39eb0c9ea1c8b4bd7f99"><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf"><a href="../../iostream.html">&lt;iostream&gt;</a></span><span class="cp"></span>
256+
<span class="cp">#include</span> <span class="cpf"><a href="../../sstream.html">&lt;sstream&gt;</a></span><span class="cp"></span>
257+
<span class="cp">#include</span> <span class="cpf"><a href="../../string.html">&lt;string&gt;</a></span><span class="cp"></span>
258+
259+
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
260+
<span class="p">{</span>
261+
<span class="c1">// 文字列の取得</span>
262+
<span class="n"><span href="https://cpprefjp.github.io/reference/sstream/basic_istream.html">std::istringstream</span></span> <span class="n">iss</span><span class="p">(</span><span class="s">"Hello World 123 45.67"</span><span class="p">);</span>
263+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"Content: "</span> <span class="o">&lt;&lt;</span> <span class="n">iss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
264+
265+
<span class="c1">// 一部を読み取っても、str()は全体を返す</span>
266+
<span class="n"><a href="../../string/basic_string.html">std::string</a></span> <span class="n">word</span><span class="p">;</span>
267+
<span class="n">iss</span> <span class="o">&gt;&gt;</span> <span class="n">word</span><span class="p">;</span>
268+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"Read word: "</span> <span class="o">&lt;&lt;</span> <span class="n">word</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
269+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"Full content: "</span> <span class="o">&lt;&lt;</span> <span class="n">iss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
270+
271+
<span class="c1">// 新しい文字列を設定</span>
272+
<span class="n">iss</span><span class="p">.</span><span class="n">str</span><span class="p">(</span><span class="s">"New content 999"</span><span class="p">);</span>
273+
<span class="n">iss</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span> <span class="c1">// エラーフラグをクリア</span>
274+
275+
<span class="c1">// 新しい内容から読み取り</span>
276+
<span class="n"><a href="../../string/basic_string.html">std::string</a></span> <span class="n">s1</span><span class="p">,</span> <span class="n">s2</span><span class="p">;</span>
277+
<span class="kt">int</span> <span class="n">num</span><span class="p">;</span>
278+
<span class="n">iss</span> <span class="o">&gt;&gt;</span> <span class="n">s1</span> <span class="o">&gt;&gt;</span> <span class="n">s2</span> <span class="o">&gt;&gt;</span> <span class="n">num</span><span class="p">;</span>
279+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"New read: "</span> <span class="o">&lt;&lt;</span> <span class="n">s1</span> <span class="o">&lt;&lt;</span> <span class="s">" "</span> <span class="o">&lt;&lt;</span> <span class="n">s2</span> <span class="o">&lt;&lt;</span> <span class="s">" "</span> <span class="o">&lt;&lt;</span> <span class="n">num</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
280+
281+
<span class="c1">// 空文字列を設定してリセット</span>
282+
<span class="n">iss</span><span class="p">.</span><span class="n">str</span><span class="p">(</span><span class="s">""</span><span class="p">);</span>
283+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"Empty? "</span> <span class="o">&lt;&lt;</span> <span class="p">(</span><span class="n">iss</span><span class="p">.</span><span class="n">str</span><span class="p">().</span><span class="n">empty</span><span class="p">()</span> <span class="o">?</span> <span class="s">"yes"</span> <span class="o">:</span> <span class="s">"no"</span><span class="p">)</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
284+
<span class="p">}</span>
285+
</code></pre></div>
286+
</div></p>
287+
<h3>出力</h3>
288+
<p><pre><code>Content: Hello World 123 45.67
289+
Read word: Hello
290+
Full content: Hello World 123 45.67
291+
New read: New content 999
292+
Empty? yes
293+
</code></pre></p>
254294
<h2>関連項目</h2>
255295
<ul>
256296
<li><code><a href="../basic_stringbuf/str.html">basic_stringbuf::str</a></code></li>

reference/sstream/basic_ostringstream.html

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
</head>
7070
<body>
71-
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;sstream&#34;], &#34;namespace&#34;: [&#34;std&#34;], &#34;id-type&#34;: [&#34;class template&#34;]}, &#34;sources&#34;: [], &#34;page_id&#34;: [&#34;reference&#34;, &#34;sstream&#34;, &#34;basic_ostringstream&#34;]}">
71+
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;sstream&#34;], &#34;namespace&#34;: [&#34;std&#34;], &#34;id-type&#34;: [&#34;class template&#34;]}, &#34;sources&#34;: [{&#34;id&#34;: &#34;dcd4da18532463978780213e77500901dbcc7147&#34;, &#34;source&#34;: &#34;#include &lt;iostream&gt;\n#include &lt;sstream&gt;\n#include &lt;string&gt;\n\nint main()\n{\n std::ostringstream oss;\n\n // \u6570\u5024\u3084\u6587\u5b57\u5217\u3092\u66f8\u304d\u8fbc\u3080\n oss &lt;&lt; \&#34;The answer is \&#34; &lt;&lt; 42 &lt;&lt; \&#34; and pi is approximately \&#34; &lt;&lt; 3.14;\n\n // \u6587\u5b57\u5217\u3068\u3057\u3066\u53d6\u5f97\n std::string result = oss.str();\n std::cout &lt;&lt; result &lt;&lt; std::endl;\n\n // \u30d0\u30c3\u30d5\u30a1\u3092\u30af\u30ea\u30a2\u3057\u3066\u65b0\u3057\u3044\u5185\u5bb9\u3092\u66f8\u304d\u8fbc\u3080\n oss.str(\&#34;\&#34;);\n oss &lt;&lt; \&#34;New content: \&#34; &lt;&lt; 123.456;\n std::cout &lt;&lt; oss.str() &lt;&lt; std::endl;\n}\n&#34;}], &#34;page_id&#34;: [&#34;reference&#34;, &#34;sstream&#34;, &#34;basic_ostringstream&#34;]}">
7272
<nav class="navbar navbar-default" role="navigation">
7373
<div class="container-fluid">
7474
<div class="navbar-header">
@@ -188,8 +188,8 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2025-06-05T03:37:16">
192-
2025年06月05日 03時37分16秒
191+
<span itemprop="datePublished" content="2025-06-05T03:56:00">
192+
2025年06月05日 03時56分00秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -332,11 +332,32 @@ <h2>メンバ型</h2>
332332
</tbody>
333333
</table>
334334
<h2></h2>
335-
<p><div class="codehilite"><pre><span></span><code>
335+
<p><div class="yata" id="dcd4da18532463978780213e77500901dbcc7147"><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf"><a href="../iostream.html">&lt;iostream&gt;</a></span><span class="cp"></span>
336+
<span class="cp">#include</span> <span class="cpf"><a href="../sstream.html">&lt;sstream&gt;</a></span><span class="cp"></span>
337+
<span class="cp">#include</span> <span class="cpf"><a href="../string.html">&lt;string&gt;</a></span><span class="cp"></span>
338+
339+
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
340+
<span class="p">{</span>
341+
<span class="n">std</span><span class="o">::</span><span class="n">ostringstream</span> <span class="n">oss</span><span class="p">;</span>
342+
343+
<span class="c1">// 数値や文字列を書き込む</span>
344+
<span class="n">oss</span> <span class="o">&lt;&lt;</span> <span class="s">"The answer is "</span> <span class="o">&lt;&lt;</span> <span class="mi">42</span> <span class="o">&lt;&lt;</span> <span class="s">" and pi is approximately "</span> <span class="o">&lt;&lt;</span> <span class="mf">3.14</span><span class="p">;</span>
345+
346+
<span class="c1">// 文字列として取得</span>
347+
<span class="n"><a href="../string/basic_string.html">std::string</a></span> <span class="n">result</span> <span class="o">=</span> <span class="n"><a href="basic_ostringstream/str.html">oss.str</a></span><span class="p">();</span>
348+
<span class="n"><a href="../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="n">result</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../ostream/endl.html">std::endl</a></span><span class="p">;</span>
349+
350+
<span class="c1">// バッファをクリアして新しい内容を書き込む</span>
351+
<span class="n"><a href="basic_ostringstream/str.html">oss.str</a></span><span class="p">(</span><span class="s">""</span><span class="p">);</span>
352+
<span class="n">oss</span> <span class="o">&lt;&lt;</span> <span class="s">"New content: "</span> <span class="o">&lt;&lt;</span> <span class="mf">123.456</span><span class="p">;</span>
353+
<span class="n"><a href="../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="n"><a href="basic_ostringstream/str.html">oss.str</a></span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../ostream/endl.html">std::endl</a></span><span class="p">;</span>
354+
<span class="p">}</span>
336355
</code></pre></div>
337-
</p>
356+
</div></p>
338357
<h3>出力</h3>
339-
<p><pre><code></code></pre></p>
358+
<p><pre><code>The answer is 42 and pi is approximately 3.14
359+
New content: 123.456
360+
</code></pre></p>
340361
<h2>参照</h2>
341362
<ul>
342363
<li><a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0408r7.pdf" target="_blank">P0408R7 Efficient Access to <code>basic_stringbuf</code>’s Buffer</a></li>

reference/sstream/basic_ostringstream/str.html

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
</head>
7070
<body>
71-
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;sstream&#34;], &#34;namespace&#34;: [&#34;std&#34;], &#34;class&#34;: [&#34;basic_ostringstream&#34;], &#34;id-type&#34;: [&#34;function&#34;]}, &#34;sources&#34;: [], &#34;page_id&#34;: [&#34;reference&#34;, &#34;sstream&#34;, &#34;basic_ostringstream&#34;, &#34;str&#34;]}">
71+
<header data-kunai-mdinfo="{&#34;meta&#34;: {&#34;header&#34;: [&#34;sstream&#34;], &#34;namespace&#34;: [&#34;std&#34;], &#34;class&#34;: [&#34;basic_ostringstream&#34;], &#34;id-type&#34;: [&#34;function&#34;]}, &#34;sources&#34;: [{&#34;id&#34;: &#34;28618a1cc4288447508e3eb57d463dadf77644de&#34;, &#34;source&#34;: &#34;#include &lt;iostream&gt;\n#include &lt;sstream&gt;\n#include &lt;string&gt;\n\nint main()\n{\n // \u6587\u5b57\u5217\u306e\u53d6\u5f97\n std::ostringstream oss;\n oss &lt;&lt; \&#34;Hello \&#34; &lt;&lt; 123 &lt;&lt; \&#34; World\&#34;;\n std::cout &lt;&lt; \&#34;Content: \&#34; &lt;&lt; oss.str() &lt;&lt; std::endl;\n\n // \u8ffd\u8a18\u30e2\u30fc\u30c9\n oss &lt;&lt; \&#34; + more\&#34;;\n std::cout &lt;&lt; \&#34;After append: \&#34; &lt;&lt; oss.str() &lt;&lt; std::endl;\n\n // \u65b0\u3057\u3044\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\uff08\u5185\u5bb9\u3092\u7f6e\u304d\u63db\u3048\u308b\uff09\n oss.str(\&#34;Reset content\&#34;);\n std::cout &lt;&lt; \&#34;After reset: \&#34; &lt;&lt; oss.str() &lt;&lt; std::endl;\n\n // \u66f8\u304d\u8fbc\u307f\u4f4d\u7f6e\u306f\u5148\u982d\u306b\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u308b\n oss &lt;&lt; \&#34;!!\&#34;;\n std::cout &lt;&lt; \&#34;After write: \&#34; &lt;&lt; oss.str() &lt;&lt; std::endl;\n\n // \u7a7a\u6587\u5b57\u5217\u3067\u30af\u30ea\u30a2\n oss.str(\&#34;\&#34;);\n oss &lt;&lt; \&#34;Fresh start\&#34;;\n std::cout &lt;&lt; \&#34;Final: \&#34; &lt;&lt; oss.str() &lt;&lt; std::endl;\n}\n&#34;}], &#34;page_id&#34;: [&#34;reference&#34;, &#34;sstream&#34;, &#34;basic_ostringstream&#34;, &#34;str&#34;]}">
7272
<nav class="navbar navbar-default" role="navigation">
7373
<div class="container-fluid">
7474
<div class="navbar-header">
@@ -200,8 +200,8 @@
200200

201201
<p class="text-right"><small>
202202
最終更新日時(UTC):
203-
<span itemprop="datePublished" content="2025-06-05T03:37:16">
204-
2025年06月05日 03時37分16秒
203+
<span itemprop="datePublished" content="2025-06-05T03:56:00">
204+
2025年06月05日 03時56分00秒
205205
</span>
206206
<br/>
207207
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -252,8 +252,48 @@ <h2>効果</h2>
252252
<li>(5) : <code>rdbuf()-&gt;str(s)</code> と等価</li>
253253
<li>(6) : <code>rdbuf()-&gt;str(std::move(s))</code> と等価</li>
254254
</ul>
255+
<h2></h2>
256+
<p><div class="yata" id="28618a1cc4288447508e3eb57d463dadf77644de"><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf"><a href="../../iostream.html">&lt;iostream&gt;</a></span><span class="cp"></span>
257+
<span class="cp">#include</span> <span class="cpf"><a href="../../sstream.html">&lt;sstream&gt;</a></span><span class="cp"></span>
258+
<span class="cp">#include</span> <span class="cpf"><a href="../../string.html">&lt;string&gt;</a></span><span class="cp"></span>
259+
260+
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
261+
<span class="p">{</span>
262+
<span class="c1">// 文字列の取得</span>
263+
<span class="n">std</span><span class="o">::</span><span class="n">ostringstream</span> <span class="n">oss</span><span class="p">;</span>
264+
<span class="n">oss</span> <span class="o">&lt;&lt;</span> <span class="s">"Hello "</span> <span class="o">&lt;&lt;</span> <span class="mi">123</span> <span class="o">&lt;&lt;</span> <span class="s">" World"</span><span class="p">;</span>
265+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"Content: "</span> <span class="o">&lt;&lt;</span> <span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
266+
267+
<span class="c1">// 追記モード</span>
268+
<span class="n">oss</span> <span class="o">&lt;&lt;</span> <span class="s">" + more"</span><span class="p">;</span>
269+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"After append: "</span> <span class="o">&lt;&lt;</span> <span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
270+
271+
<span class="c1">// 新しい文字列を設定(内容を置き換える)</span>
272+
<span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">(</span><span class="s">"Reset content"</span><span class="p">);</span>
273+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"After reset: "</span> <span class="o">&lt;&lt;</span> <span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
274+
275+
<span class="c1">// 書き込み位置は先頭にリセットされる</span>
276+
<span class="n">oss</span> <span class="o">&lt;&lt;</span> <span class="s">"!!"</span><span class="p">;</span>
277+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"After write: "</span> <span class="o">&lt;&lt;</span> <span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
278+
279+
<span class="c1">// 空文字列でクリア</span>
280+
<span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">(</span><span class="s">""</span><span class="p">);</span>
281+
<span class="n">oss</span> <span class="o">&lt;&lt;</span> <span class="s">"Fresh start"</span><span class="p">;</span>
282+
<span class="n"><a href="../../iostream/cout.html">std::cout</a></span> <span class="o">&lt;&lt;</span> <span class="s">"Final: "</span> <span class="o">&lt;&lt;</span> <span class="n">oss</span><span class="p">.</span><span class="n">str</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="n"><a href="../../ostream/endl.html">std::endl</a></span><span class="p">;</span>
283+
<span class="p">}</span>
284+
</code></pre></div>
285+
</div></p>
286+
<h3>出力</h3>
287+
<p><pre><code>Content: Hello 123 World
288+
After append: Hello 123 World + more
289+
After reset: Reset content
290+
After write: !!set content
291+
Final: Fresh start
292+
</code></pre></p>
255293
<h2>関連項目</h2>
256-
<p><a href="../basic_stringbuf/str.html">basic_stringbuf::str</a></p></div>
294+
<ul>
295+
<li><code><a href="../basic_stringbuf/str.html">basic_stringbuf::str</a></code></li>
296+
</ul></div>
257297

258298
</div>
259299
</div>

0 commit comments

Comments
 (0)