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
37
source/libs/string/basic_string/length.rst
Normal file
37
source/libs/string/basic_string/length.rst
Normal file
|
@ -0,0 +1,37 @@
|
|||
.. _sprout-string-basic_string-length:
|
||||
###############################################################################
|
||||
length
|
||||
###############################################################################
|
||||
|
||||
Interface
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
SPROUT_CONSTEXPR size_type length() const SPROUT_NOEXCEPT;
|
||||
|
||||
Returns
|
||||
========================================
|
||||
|
||||
| The number of elements contained in the string.
|
||||
|
||||
Examples
|
||||
========================================
|
||||
.. sourcecode:: c++
|
||||
|
||||
#include <sprout/string.hpp>
|
||||
using namespace sprout;
|
||||
|
||||
SPROUT_STATIC_CONSTEXPR auto input = string<8>("homuhomu");
|
||||
static_assert(input.length() == 8, "input size is 8.");
|
||||
|
||||
Complexity
|
||||
========================================
|
||||
|
||||
| Recursive function invocations in *O(1)* (constant) depth.
|
||||
|
||||
Header
|
||||
========================================
|
||||
|
||||
| ``sprout/string/string.hpp``
|
||||
| Convenience header: ``sprout/string.hpp``
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue