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:
parent
794666afac
commit
5e83aa2c79
24 changed files with 1577 additions and 17 deletions
40
source/libs/string/basic_string/operator-equal_to.rst
Normal file
40
source/libs/string/basic_string/operator-equal_to.rst
Normal 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``
|
||||
|
40
source/libs/string/basic_string/operator-greater.rst
Normal file
40
source/libs/string/basic_string/operator-greater.rst
Normal 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``
|
||||
|
40
source/libs/string/basic_string/operator-greater_equal.rst
Normal file
40
source/libs/string/basic_string/operator-greater_equal.rst
Normal 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``
|
||||
|
40
source/libs/string/basic_string/operator-less.rst
Normal file
40
source/libs/string/basic_string/operator-less.rst
Normal 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``
|
||||
|
40
source/libs/string/basic_string/operator-less_equal.rst
Normal file
40
source/libs/string/basic_string/operator-less_equal.rst
Normal 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``
|
||||
|
40
source/libs/string/basic_string/operator-not_equal_to.rst
Normal file
40
source/libs/string/basic_string/operator-not_equal_to.rst
Normal 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``
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue