mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add tristate_lexicographical_compare: delimiter version
This commit is contained in:
parent
0670013702
commit
e5332c18c2
5 changed files with 165 additions and 21 deletions
|
@ -5,7 +5,6 @@
|
|||
#include <sprout/config.hpp>
|
||||
#include <sprout/iterator/ptr_index_iterator.hpp>
|
||||
#include <sprout/algorithm/tristate_lexicographical_compare.hpp>
|
||||
#include <sprout/cstring/strlen.hpp>
|
||||
#include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT
|
||||
|
||||
namespace sprout {
|
||||
|
@ -13,8 +12,8 @@ namespace sprout {
|
|||
inline SPROUT_CONSTEXPR int
|
||||
strncmp(char const* s1, char const* s2, std::size_t n) {
|
||||
return sprout::tristate_lexicographical_compare(
|
||||
sprout::as_iterator(s1), sprout::as_iterator(s1, sprout::strlen(s1, n)),
|
||||
sprout::as_iterator(s2), sprout::as_iterator(s2, sprout::strlen(s2, n))
|
||||
sprout::as_iterator(s1), sprout::as_iterator(s1, n), '\0',
|
||||
sprout::as_iterator(s2), sprout::as_iterator(s2, n), '\0'
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue