1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-07-02 14:04:09 +00:00

add doc: string comparison

This commit is contained in:
Bolero-MURAKAMI 2013-09-04 19:28:01 +09:00
parent 794666afac
commit 5e83aa2c79
24 changed files with 1577 additions and 17 deletions

View file

@ -0,0 +1,40 @@
.. _sprout-string-basic_string-operator-equal_to:
###############################################################################
operator==
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T, std::size_t N1, std::size_t N2, typename Traits>
inline SPROUT_CONSTEXPR bool
operator==(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs);
Returns
========================================
| true if the contents of the containers are equivalent, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>("homuhomu");
static_assert(x == y, "x is equal to y.");
Complexity
========================================
| Recursive function invocations in *O(logN)* (logarithmic) depth.
Header
========================================
| ``sprout/string/comparison.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-basic_string-operator-greater:
###############################################################################
operator>
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T, std::size_t N1, std::size_t N2, typename Traits>
inline SPROUT_CONSTEXPR bool
operator>(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs);
Returns
========================================
| true if the contents of the lhs are lexicographically greater than the contents of rhs, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
static_assert(y > x, "y is greater than x.");
Complexity
========================================
| Recursive function invocations in *O(logN)* (logarithmic) depth.
Header
========================================
| ``sprout/string/comparison.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-basic_string-operator-greater_equal:
###############################################################################
operator>=
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T, std::size_t N1, std::size_t N2, typename Traits>
inline SPROUT_CONSTEXPR bool
operator>=(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs);
Returns
========================================
| true if the contents of the lhs are lexicographically greater than or equal the contents of rhs, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
static_assert(y >= x, "y is greater than or equal to x.");
Complexity
========================================
| Recursive function invocations in *O(logN)* (logarithmic) depth.
Header
========================================
| ``sprout/string/comparison.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-basic_string-operator-less:
###############################################################################
operator<
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T, std::size_t N1, std::size_t N2, typename Traits>
inline SPROUT_CONSTEXPR bool
operator<(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs);
Returns
========================================
| true if the contents of the lhs are lexicographically less than the contents of rhs, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
static_assert(x < y, "x is less than y.");
Complexity
========================================
| Recursive function invocations in *O(logN)* (logarithmic) depth.
Header
========================================
| ``sprout/string/comparison.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-basic_string-operator-less_equal:
###############################################################################
operator<=
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T, std::size_t N1, std::size_t N2, typename Traits>
inline SPROUT_CONSTEXPR bool
operator<=(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs);
Returns
========================================
| true if the contents of the lhs are lexicographically less than or equal the contents of rhs, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
static_assert(x <= y, "x is less than or equal to y.");
Complexity
========================================
| Recursive function invocations in *O(logN)* (logarithmic) depth.
Header
========================================
| ``sprout/string/comparison.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-basic_string-operator-not_equal_to:
###############################################################################
operator!=
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T, std::size_t N1, std::size_t N2, typename Traits>
inline SPROUT_CONSTEXPR bool
operator!=(sprout::basic_string<T, N1, Traits> const& lhs, sprout::basic_string<T, N2, Traits> const& rhs);
Returns
========================================
| true if the contents of the containers are not equivalent, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto x = string<8>("homuhomu");
SPROUT_STATIC_CONSTEXPR auto y = string<8>("madocchi");
static_assert(x != y, "x is not equal to y.");
Complexity
========================================
| Recursive function invocations in *O(logN)* (logarithmic) depth.
Header
========================================
| ``sprout/string/comparison.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -7,6 +7,12 @@ Sprout.String
:hidden:
basic_string/swap-global
basic_string/operator-equal_to
basic_string/operator-not_equal_to
basic_string/operator-less
basic_string/operator-greater
basic_string/operator-less_equal
basic_string/operator-greater_equal
basic_string/std-tuple_size
basic_string/std-tuple_element
basic_string/tuple_get