ReactOS  0.4.14-dev-606-g14ebc0b
_string.c File Reference
#include <stl/_string.h>
#include <stl/_ctraits_fns.h>
#include <stl/_function.h>
#include <stl/_range_errors.h>
Include dependency graph for _string.c:

Go to the source code of this file.

Classes

struct  _Not_within_traits< _Traits >
 

Macros

#define _STLP_STRING_C
 
#define __size_type__   _STLP_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::size_type
 

Functions

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_of_aux (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __true_type &)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_of_aux (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __false_type &)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_of (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *__traits)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux3 (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __true_type &__useStrcspnLikeAlgo)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux3 (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __false_type &)
 
template<class _InputIter , class _CharT , class _Tp , class _Traits >
_InputIter __str_find_first_not_of_aux2 (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Tp *__pt, _Traits *__traits)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux1 (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *__traits, const __true_type &)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux1 (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __false_type &)
 
template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of (_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *__traits)
 
template<class _CharT , class _Traits , class _Alloc >
_STLP_MOVE_TO_PRIV_NAMESPACE void _STLP_CALL _S_string_copy (const basic_string< _CharT, _Traits, _Alloc > &__s, _CharT *__buf, size_t __n)
 

Macro Definition Documentation

◆ __size_type__

#define __size_type__   _STLP_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::size_type

Definition at line 50 of file _string.c.

◆ _STLP_STRING_C

#define _STLP_STRING_C

Definition at line 25 of file _string.c.

Function Documentation

◆ __str_find_first_not_of()

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  __traits 
)
inline

Definition at line 134 of file _string.c.

136  {
137 #if !defined (__BORLANDC__)
138  typedef typename _IsSTLportClass<_Traits>::_Ret _STLportTraits;
139 #else
140  enum { _Is = _IsSTLportClass<_Traits>::_Is };
141  typedef typename __bool2type<_Is>::_Ret _STLportTraits;
142 #endif
143  return __str_find_first_not_of_aux1(__first1, __last1, __first2, __last2, __traits, _STLportTraits());
144 }
_InputIter __str_find_first_not_of_aux1(_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *__traits, const __true_type &)
Definition: _string.c:121

Referenced by basic_string< char, char_traits< char >, allocator< char > >::find_first_not_of(), and basic_string< char, char_traits< char >, allocator< char > >::find_last_not_of().

◆ __str_find_first_not_of_aux1() [1/2]

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux1 ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  __traits,
const __true_type  
)
inline

Definition at line 121 of file _string.c.

124 { return __str_find_first_not_of_aux2(__first1, __last1, __first2, __last2,
125  _STLP_VALUE_TYPE(__first1, _InputIter), __traits); }
_InputIter __str_find_first_not_of_aux2(_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Tp *__pt, _Traits *__traits)
Definition: _string.c:111
#define _STLP_VALUE_TYPE(_It, _Tp)

Referenced by __str_find_first_not_of().

◆ __str_find_first_not_of_aux1() [2/2]

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux1 ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  ,
const __false_type  
)
inline

Definition at line 128 of file _string.c.

131 { return _STLP_STD::find_if(__first1, __last1, _STLP_PRIV _Not_within_traits<_Traits>(__first2, __last2)); }
_STLP_MOVE_TO_STD_NAMESPACE _InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred)
Definition: _algobase.c:214
#define _STLP_PRIV
Definition: _dm.h:70

◆ __str_find_first_not_of_aux2()

template<class _InputIter , class _CharT , class _Tp , class _Traits >
_InputIter __str_find_first_not_of_aux2 ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Tp *  __pt,
_Traits *  __traits 
)
inline

Definition at line 111 of file _string.c.

113  {
114  typedef typename _IsIntegral<_Tp>::_Ret _IsIntegral;
115  typedef typename _IsCharLikeType<_CharT>::_Ret _IsCharLike;
116  typedef typename _Land2<_IsIntegral, _IsCharLike>::_Ret _UseStrcspnLikeAlgo;
117  return __str_find_first_not_of_aux3(__first1, __last1, __first2, __last2, __traits, _UseStrcspnLikeAlgo());
118 }
_InputIter __str_find_first_not_of_aux3(_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __true_type &__useStrcspnLikeAlgo)
Definition: _string.c:99

Referenced by __str_find_first_not_of_aux1().

◆ __str_find_first_not_of_aux3() [1/2]

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux3 ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  ,
const __true_type __useStrcspnLikeAlgo 
)
inline

Definition at line 99 of file _string.c.

102 { return __find_first_of_aux2(__first1, __last1, __first2, __last2, __first2, not1(_Identity<bool>()), __useStrcspnLikeAlgo); }
unary_negate< _Predicate > not1(const _Predicate &__pred)
Definition: _function.h:154
_InputIter __find_first_of_aux2(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2, _Tp2 *, _Predicate __pred, const __true_type &)
Definition: _algobase.c:297

Referenced by __str_find_first_not_of_aux2().

◆ __str_find_first_not_of_aux3() [2/2]

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_not_of_aux3 ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  ,
const __false_type  
)
inline

Definition at line 105 of file _string.c.

108 { return _STLP_STD::find_if(__first1, __last1, _STLP_PRIV _Not_within_traits<_Traits>(__first2, __last2)); }
_STLP_MOVE_TO_STD_NAMESPACE _InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred)
Definition: _algobase.c:214
#define _STLP_PRIV
Definition: _dm.h:70

◆ __str_find_first_of()

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_of ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  __traits 
)
inline

Definition at line 86 of file _string.c.

88  {
89 #if !defined (__BORLANDC__)
90  typedef typename _IsSTLportClass<_Traits>::_Ret _STLportTraits;
91 #else
92  enum { _Is = _IsSTLportClass<_Traits>::_Is };
93  typedef typename __bool2type<_Is>::_Ret _STLportTraits;
94 #endif
95  return __str_find_first_of_aux(__first1, __last1, __first2, __last2, __traits, _STLportTraits());
96 }
_InputIter __str_find_first_of_aux(_InputIter __first1, _InputIter __last1, const _CharT *__first2, const _CharT *__last2, _Traits *, const __true_type &)
Definition: _string.c:74

Referenced by basic_string< char, char_traits< char >, allocator< char > >::find_first_of(), and basic_string< char, char_traits< char >, allocator< char > >::find_last_of().

◆ __str_find_first_of_aux() [1/2]

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_of_aux ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  ,
const __true_type  
)
inline

Definition at line 74 of file _string.c.

77 { return __find_first_of(__first1, __last1, __first2, __last2); }
_InputIter __find_first_of(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2)
Definition: _algobase.c:339

Referenced by __str_find_first_of().

◆ __str_find_first_of_aux() [2/2]

template<class _InputIter , class _CharT , class _Traits >
_InputIter __str_find_first_of_aux ( _InputIter  __first1,
_InputIter  __last1,
const _CharT *  __first2,
const _CharT *  __last2,
_Traits *  ,
const __false_type  
)
inline

Definition at line 80 of file _string.c.

83 { return __find_first_of(__first1, __last1, __first2, __last2, _STLP_PRIV _Eq_traits<_Traits>()); }
_InputIter __find_first_of(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2)
Definition: _algobase.c:339
#define _STLP_PRIV
Definition: _dm.h:70

◆ _S_string_copy()

template<class _CharT , class _Traits , class _Alloc >
_STLP_MOVE_TO_PRIV_NAMESPACE void _STLP_CALL _S_string_copy ( const basic_string< _CharT, _Traits, _Alloc > &  __s,
_CharT *  __buf,
size_t  __n 
)

Definition at line 578 of file _string.c.

579  {
580  if (__n > 0) {
581  __n = (min) (__n - 1, __s.size());
582  _STLP_STD::copy(__s.begin(), __s.begin() + __n, __buf);
583  __buf[__n] = _CharT();
584  }
585 }
return __n
Definition: _algo.h:75
iterator begin()
Definition: _string.h:385
size_type size() const
Definition: _string.h:400
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
#define min(a, b)
Definition: monoChain.cc:55