ReactOS 0.4.17-dev-966-gf06eace
std::char_traits< WCHAR > Struct Reference

#include <char_traits.h>

Inheritance diagram for std::char_traits< WCHAR >:
Collaboration diagram for std::char_traits< WCHAR >:

Static Public Member Functions

static int compare (const char_type *s1, const char_type *s2, size_t n) _NOEXCEPT
 
static size_t length (const char_type *s)
 
static const char_type * find (const char_type *s, size_t n, const char_type &a) _NOEXCEPT
 
- Static Public Member Functions inherited from __char_traits_base< WCHAR, wint_t, static_cast< WCHAR >(WEOF)>
static void _STLP_CALL assign (char_type &__c1, const char_type &__c2)
 
static char_type *_STLP_CALL assign (char_type *__s, size_t __n, char_type __c)
 
static bool _STLP_CALL eq (const char_type &__c1, const char_type &__c2)
 
static bool _STLP_CALL lt (const char_type &__c1, const char_type &__c2)
 
static int _STLP_CALL compare (const char_type *__s1, const char_type *__s2, size_t __n)
 
static size_t _STLP_CALL length (const char_type *__s)
 
static const char_type *_STLP_CALL find (const char_type *__s, size_t __n, const char_type &__c)
 
static char_type *_STLP_CALL move (char_type *__s1, const char_type *__s2, size_t _Sz)
 
static char_type *_STLP_CALL copy (char_type *__s1, const char_type *__s2, size_t __n)
 
static int_type _STLP_CALL not_eof (const int_type &__c)
 
static char_type _STLP_CALL to_char_type (const int_type &__c)
 
static int_type _STLP_CALL to_int_type (const char_type &__c)
 
static bool _STLP_CALL eq_int_type (const int_type &__c1, const int_type &__c2)
 
static int_type _STLP_CALL eof ()
 

Additional Inherited Members

- Public Types inherited from __char_traits_base< WCHAR, wint_t, static_cast< WCHAR >(WEOF)>
typedef WCHAR char_type
 
typedef wint_t int_type
 
typedef streamoff off_type
 
typedef streampos pos_type
 
typedef mbstate_t state_type
 

Detailed Description

Definition at line 29 of file char_traits.h.

Member Function Documentation

◆ compare()

static int std::char_traits< WCHAR >::compare ( const char_type *  s1,
const char_type *  s2,
size_t  n 
)
inlinestatic

Definition at line 31 of file char_traits.h.

31 {
32 if (n == 0)
33 return 0;
34
35 for (; n; --n, ++s1, ++s2) {
36 if (*s1 < *s2) return -1;
37 if (*s2 < *s1) return 1;
38 }
39
40 return 0;
41 }
GLdouble n
Definition: glext.h:7729
struct S1 s1
PCWSTR s2
Definition: shell32_main.h:38

◆ find()

static const char_type * std::char_traits< WCHAR >::find ( const char_type *  s,
size_t  n,
const char_type &  a 
)
inlinestatic

Definition at line 52 of file char_traits.h.

52 {
53 for (; n; --n) {
54 if (*s == a) return s;
55 s++;
56 }
57
58 return NULL;
59 }
#define NULL
Definition: types.h:112
GLdouble s
Definition: gl.h:2039
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ length()

static size_t std::char_traits< WCHAR >::length ( const char_type *  s)
inlinestatic

Definition at line 43 of file char_traits.h.

43 {
44 size_t n = 0;
45 while (*s != '\0') {
46 n++;
47 s++;
48 }
49 return n;
50 }

The documentation for this struct was generated from the following file: