mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-16 15:14:13 +00:00
add doc: basic_string assign
This commit is contained in:
parent
c6a9bf338a
commit
5af5e8c300
24 changed files with 1489 additions and 44 deletions
34
source/libs/string/basic_string/clear.rst
Normal file
34
source/libs/string/basic_string/clear.rst
Normal file
|
@ -0,0 +1,34 @@
|
|||
.. _sprout-string-basic_string-clear:
|
||||
###############################################################################
|
||||
clear
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
void clear() SPROUT_NOEXCEPT;
|
||||
|
||||
Effects
|
||||
========================================
|
||||
|
||||
| Fill [begin,end) with value_type(), and set the 0 to length.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/assert.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
auto x = string<8>("homuhomu");
|
||||
x.clear();
|
||||
SPROUT_ASSERT_MSG(x.size() == 0 && x == "", "string is cleared.");
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/string.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue