• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>basic_static_string::assign (4 of 9 overloads)</title>
5<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../../index.html" title="Boost.StaticString">
8<link rel="up" href="../assign.html" title="basic_static_string::assign">
9<link rel="prev" href="overload3.html" title="basic_static_string::assign (3 of 9 overloads)">
10<link rel="next" href="overload5.html" title="basic_static_string::assign (5 of 9 overloads)">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="overload3.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../assign.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload5.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h5 class="title">
27<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4"></a><a class="link" href="overload4.html" title="basic_static_string::assign (4 of 9 overloads)">basic_static_string::assign
28          (4 of 9 overloads)</a>
29</h5></div></div></div>
30<p>
31            Assign to the string.
32          </p>
33<h6>
34<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h0"></a>
35            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.synopsis"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.synopsis">Synopsis</a>
36          </h6>
37<pre class="programlisting"><span class="keyword">constexpr</span> <span class="identifier">basic_static_string</span><span class="special">&amp;</span>
38<span class="identifier">assign</span><span class="special">(</span>
39    <span class="identifier">const_pointer</span> <span class="identifier">s</span><span class="special">,</span>
40    <span class="identifier">size_type</span> <span class="identifier">count</span><span class="special">);</span>
41</pre>
42<h6>
43<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h1"></a>
44            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.description"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.description">Description</a>
45          </h6>
46<p>
47            Replaces the contents with those of <code class="computeroutput"><span class="special">{</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">s</span> <span class="special">+</span> <span class="identifier">count</span><span class="special">)</span></code>.
48          </p>
49<h6>
50<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h2"></a>
51            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.complexity"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.complexity">Complexity</a>
52          </h6>
53<p>
54            Linear in <code class="computeroutput"><span class="identifier">count</span></code>.
55          </p>
56<h6>
57<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h3"></a>
58            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.exception_safety"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.exception_safety">Exception
59            Safety</a>
60          </h6>
61<p>
62            Strong guarantee.
63          </p>
64<h6>
65<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h4"></a>
66            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.remarks"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.remarks">Remarks</a>
67          </h6>
68<p>
69            The range can contain null characters.
70          </p>
71<h6>
72<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h5"></a>
73            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.return_value"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.return_value">Return
74            Value</a>
75          </h6>
76<p>
77            <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>
78          </p>
79<h6>
80<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h6"></a>
81            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.parameters"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.parameters">Parameters</a>
82          </h6>
83<div class="informaltable"><table class="table">
84<colgroup>
85<col>
86<col>
87</colgroup>
88<thead><tr>
89<th>
90                    <p>
91                      Name
92                    </p>
93                  </th>
94<th>
95                    <p>
96                      Description
97                    </p>
98                  </th>
99</tr></thead>
100<tbody>
101<tr>
102<td>
103                    <p>
104                      <code class="computeroutput"><span class="identifier">count</span></code>
105                    </p>
106                  </td>
107<td>
108                    <p>
109                      The number of characters to copy.
110                    </p>
111                  </td>
112</tr>
113<tr>
114<td>
115                    <p>
116                      <code class="computeroutput"><span class="identifier">s</span></code>
117                    </p>
118                  </td>
119<td>
120                    <p>
121                      A pointer to the string to copy from.
122                    </p>
123                  </td>
124</tr>
125</tbody>
126</table></div>
127<h6>
128<a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.h7"></a>
129            <span class="phrase"><a name="static_string.ref.boost__static_strings__basic_static_string.assign.overload4.exceptions"></a></span><a class="link" href="overload4.html#static_string.ref.boost__static_strings__basic_static_string.assign.overload4.exceptions">Exceptions</a>
130          </h6>
131<div class="informaltable"><table class="table">
132<colgroup>
133<col>
134<col>
135</colgroup>
136<thead><tr>
137<th>
138                    <p>
139                      Type
140                    </p>
141                  </th>
142<th>
143                    <p>
144                      Thrown On
145                    </p>
146                  </th>
147</tr></thead>
148<tbody><tr>
149<td>
150                    <p>
151                      <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">length_error</span></code>
152                    </p>
153                  </td>
154<td>
155                    <p>
156                      count &gt; <a class="link" href="../max_size.html" title="basic_static_string::max_size"><code class="computeroutput"><span class="identifier">max_size</span><span class="special">()</span></code></a>.
157                    </p>
158                  </td>
159</tr></tbody>
160</table></div>
161</div>
162<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
163<td align="left"></td>
164<td align="right"><div class="copyright-footer">Copyright © 2019, 2020 Krystian Stasiowski<br>Copyright © 2016-2019 Vinnie
165      Falco<p>
166        Distributed under the Boost Software License, Version 1.0. (See accompanying
167        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
168      </p>
169</div></td>
170</tr></table>
171<hr>
172<div class="spirit-nav">
173<a accesskey="p" href="overload3.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../assign.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload5.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
174</div>
175</body>
176</html>
177