diff --git a/docs/_sources/libs/string/basic_string/assign.txt b/docs/_sources/libs/string/basic_string/assign.txt index fa03d292..7cc59a8a 100644 --- a/docs/_sources/libs/string/basic_string/assign.txt +++ b/docs/_sources/libs/string/basic_string/assign.txt @@ -20,6 +20,19 @@ Returns | ``*this``. +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + using namespace sprout; + + auto x = string<8>("homuhomu"); + SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi"); + x.assign(y); + SPROUT_ASSERT_MSG(x == y, "y is assigned to x."); + ---- Interface @@ -137,19 +150,6 @@ Returns | ``*this``. -Examples -======================================== -.. sourcecode:: c++ - - #include - #include - using namespace sprout; - - auto x = string<8>("homuhomu"); - SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi"); - x.assign(y); - SPROUT_ASSERT_MSG(x == y, "y is assigned to x."); - Header ======================================== diff --git a/docs/_sources/libs/string/basic_string/operator-assign.txt b/docs/_sources/libs/string/basic_string/operator-assign.txt new file mode 100644 index 00000000..43d1e505 --- /dev/null +++ b/docs/_sources/libs/string/basic_string/operator-assign.txt @@ -0,0 +1,63 @@ +.. _sprout-string-basic_string-operator-assign: +############################################################################### +operator= +############################################################################### + +Interface +======================================== +.. sourcecode:: c++ + + basic_string& operator=(basic_string const& rhs); + + template::type> + basic_string& operator=(basic_string const& rhs); + + basic_string& operator=(value_type const* rhs); + +Effects +======================================== + +| Equivalent to ``assign(rhs)``. + +Returns +======================================== + +| ``*this``. + +Examples +======================================== +.. sourcecode:: c++ + + #include + #include + using namespace sprout; + + auto x = string<8>("homuhomu"); + SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi"); + x = y; + SPROUT_ASSERT_MSG(x == y, "y is assigned to x."); + +---- + +Interface +======================================== +.. sourcecode:: c++ + + basic_string& operator=(value_type rhs); + +Effects +======================================== + +| Equivalent to ``assign(1, rhs)``. + +Returns +======================================== + +| ``*this``. + +Header +======================================== + +| ``sprout/string/string.hpp`` +| Convenience header: ``sprout/string.hpp`` + diff --git a/docs/libs/string/basic_string/assign.html b/docs/libs/string/basic_string/assign.html index 589393dc..9b660fb2 100644 --- a/docs/libs/string/basic_string/assign.html +++ b/docs/libs/string/basic_string/assign.html @@ -68,6 +68,7 @@
  • Interface
  • Effects
  • Returns
  • +
  • Examples
  • Interface
  • Requires
  • Effects
  • @@ -88,7 +89,6 @@
  • Interface
  • Effects
  • Returns
  • -
  • Examples
  • Header
  • @@ -147,6 +147,19 @@
    *this.
    +
    +

    Examples

    +
    #include <sprout/string.hpp>
    +#include <sprout/assert.hpp>
    +using namespace sprout;
    +
    +auto x = string<8>("homuhomu");
    +SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
    +x.assign(y);
    +SPROUT_ASSERT_MSG(x == y, "y is assigned to x.");
    +
    +
    +

    Interface

    @@ -274,19 +287,6 @@
    *this.
    -
    -

    Examples

    -
    #include <sprout/string.hpp>
    -#include <sprout/assert.hpp>
    -using namespace sprout;
    -
    -auto x = string<8>("homuhomu");
    -SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
    -x.assign(y);
    -SPROUT_ASSERT_MSG(x == y, "y is assigned to x.");
    -
    -
    -