Function comparei

Summary

#include <include/EASTL/string.h>

(1) int comparei(const this_type &x) const EA_NOEXCEPT

(2) int comparei(const value_type *p) const

(3) static int comparei(const value_type *pBegin1, const value_type *pEnd1, const value_type *pBegin2, const value_type *pEnd2)

Function overload

Synopsis

#include <include/EASTL/string.h>

int comparei(const this_type &x) const EA_NOEXCEPT

Description

Case-insensitive comparison functions. Not part of C++ this_type. Only ASCII-level locale functionality is supported. Thus this is not suitable for localization purposes.

Source

Lines 3177-3181 in include/EASTL/string.h. Line 730 in include/EASTL/string.h.

template <typename T, typename Allocator>
inline int basic_string<T, Allocator>::comparei(const this_type& x) const EA_NOEXCEPT
{
    return comparei(internalLayout().BeginPtr(), internalLayout().EndPtr(), x.internalLayout().BeginPtr(), x.internalLayout().EndPtr());
}

Synopsis

#include <include/EASTL/string.h>

int comparei(const value_type *p) const

Description

No description yet.

Source

Lines 3184-3188 in include/EASTL/string.h. Line 731 in include/EASTL/string.h.

template <typename T, typename Allocator>
inline int basic_string<T, Allocator>::comparei(const value_type* p) const
{
    return comparei(internalLayout().BeginPtr(), internalLayout().EndPtr(), p, p + CharStrlen(p));
}

Synopsis

#include <include/EASTL/string.h>

static int comparei(const value_type *pBegin1, const value_type *pEnd1, const value_type *pBegin2, const value_type *pEnd2)

Description

No description yet.

Source

Lines 3164-3174 in include/EASTL/string.h. Line 732 in include/EASTL/string.h.

template <typename T, typename Allocator>
int basic_string<T, Allocator>::comparei(const value_type* pBegin1, const value_type* pEnd1,
                                         const value_type* pBegin2, const value_type* pEnd2)
{
    const difference_type n1   = pEnd1 - pBegin1;
    const difference_type n2   = pEnd2 - pBegin2;
    const difference_type nMin = eastl::min_alt(n1, n2);
    const int       cmp  = CompareI(pBegin1, pBegin2, (size_t)nMin);
    return (cmp != 0 ? cmp : (n1 < n2 ? -1 : (n1 > n2 ? 1 : 0)));
}





Add Discussion as Guest

Log in