ReactOS 0.4.15-dev-7842-g558ab78
_string_operators.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class _CharT , class _Traits , class _Alloc >
_STLP_BEGIN_NAMESPACE basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ (const basic_string< _CharT, _Traits, _Alloc > &__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ (_CharT __c, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 
template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT __c)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator== (const basic_string< _CharT, _Traits, _Alloc > &__x, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator== (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator== (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator< (const basic_string< _CharT, _Traits, _Alloc > &__x, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator< (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator< (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator!= (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator!= (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator> (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator> (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator<= (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator<= (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator>= (const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
 
template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator>= (const basic_string< _CharT, _Traits, _Alloc > &__x, const _CharT *__s)
 

Function Documentation

◆ operator!=() [1/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator!= ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 465 of file _string_operators.h.

466 {
468 return !(__s == __y);
469}
#define _STLP_FIX_LITERAL_BUG(__x)
Definition: features.h:301

◆ operator!=() [2/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator!= ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 473 of file _string_operators.h.

474 {
476 return !(__x == __s);
477}

◆ operator+() [1/5]

template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ ( _CharT  __c,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 64 of file _string_operators.h.

65 {
67 typedef typename _Str::_Reserve_t _Reserve_t;
68# if defined (_STLP_INIT_AMBIGUITY)
69 _Str __result = _Str(_Reserve_t(), 1 + __y.size(), __y.get_allocator());
70# else
71 _Str __result(_Reserve_t(), 1 + __y.size(), __y.get_allocator());
72# endif
73 __result.push_back(__c);
74 __result.append(__y);
75 return __result;
76}
size_type size() const
Definition: _string.h:400
allocator_type get_allocator() const
Definition: _string.h:154
#define __c
Definition: schilyio.h:209

◆ operator+() [2/5]

template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 46 of file _string_operators.h.

47 {
50 typedef typename _Str::_Reserve_t _Reserve_t;
51 const size_t __n = _Traits::length(__s);
52# if defined (_STLP_INIT_AMBIGUITY)
53 _Str __result = _Str(_Reserve_t(), __n + __y.size(), __y.get_allocator());
54# else
55 _Str __result(_Reserve_t(), __n + __y.size(), __y.get_allocator());
56# endif
57 __result.append(__s, __s + __n);
58 __result.append(__y);
59 return __result;
60}
return __n
Definition: _algo.h:75

◆ operator+() [3/5]

template<class _CharT , class _Traits , class _Alloc >
_STLP_BEGIN_NAMESPACE basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ ( const basic_string< _CharT, _Traits, _Alloc > &  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 29 of file _string_operators.h.

30 {
32 typedef typename _Str::_Reserve_t _Reserve_t;
33# if defined (_STLP_INIT_AMBIGUITY)
34 // gcc counts this as a function
35 _Str __result = _Str(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator());
36# else
37 _Str __result(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator());
38# endif
39 __result.append(__s);
40 __result.append(__y);
41 return __result;
42}

◆ operator+() [4/5]

template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 80 of file _string_operators.h.

81 {
84 typedef typename _Str::_Reserve_t _Reserve_t;
85 const size_t __n = _Traits::length(__s);
86# if defined (_STLP_INIT_AMBIGUITY)
87 _Str __result = _Str(_Reserve_t(), __x.size() + __n, __x.get_allocator());
88# else
89 _Str __result(_Reserve_t(), __x.size() + __n, __x.get_allocator());
90# endif
91 __result.append(__x);
92 __result.append(__s, __s + __n);
93 return __result;
94}

◆ operator+() [5/5]

template<class _CharT , class _Traits , class _Alloc >
basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+ ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT  __c 
)
inline

Definition at line 98 of file _string_operators.h.

99 {
101 typedef typename _Str::_Reserve_t _Reserve_t;
102# if defined (_STLP_INIT_AMBIGUITY)
103 _Str __result = _Str(_Reserve_t(), __x.size() + 1, __x.get_allocator());
104# else
105 _Str __result(_Reserve_t(), __x.size() + 1, __x.get_allocator());
106# endif
107 __result.append(__x);
108 __result.push_back(__c);
109 return __result;
110}

◆ operator<() [1/3]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator< ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 376 of file _string_operators.h.

378 {
380 size_t __n = _Traits::length(__s);
382 __y.begin(), __y.end()) < 0;
383}
iterator end()
Definition: _string.h:386
iterator begin()
Definition: _string.h:385

◆ operator<() [2/3]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator< ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 386 of file _string_operators.h.

388 {
390 size_t __n = _Traits::length(__s);
392 __s, __s + __n) < 0;
393}

◆ operator<() [3/3]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator< ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 350 of file _string_operators.h.

352 {
354 __y.begin(), __y.end()) < 0;
355}

◆ operator<=() [1/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator<= ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 532 of file _string_operators.h.

534 {
536 return !(__y < __s);
537}

◆ operator<=() [2/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator<= ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 540 of file _string_operators.h.

542 {
544 return !(__s < __x);
545}

◆ operator==() [1/3]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator== ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 311 of file _string_operators.h.

312 {
314 size_t __n = _Traits::length(__s);
315 return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0;
316}
const _CharT * data() const
Definition: _string.h:950

◆ operator==() [2/3]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator== ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 320 of file _string_operators.h.

321 {
323 size_t __n = _Traits::length(__s);
324 return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0;
325}

◆ operator==() [3/3]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator== ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 287 of file _string_operators.h.

288 {
289 return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0;
290}

◆ operator>() [1/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator> ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 499 of file _string_operators.h.

500 {
502 return __y < __s;
503}

◆ operator>() [2/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator> ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 507 of file _string_operators.h.

508 {
510 return __s < __x;
511}

◆ operator>=() [1/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator>= ( const _CharT *  __s,
const basic_string< _CharT, _Traits, _Alloc > &  __y 
)
inline

Definition at line 567 of file _string_operators.h.

568 {
570 return !(__s < __y);
571}

◆ operator>=() [2/2]

template<class _CharT , class _Traits , class _Alloc >
bool _STLP_CALL operator>= ( const basic_string< _CharT, _Traits, _Alloc > &  __x,
const _CharT *  __s 
)
inline

Definition at line 575 of file _string_operators.h.

576 {
578 return !(__x < __s);
579}